---
updatedAt: 2026-08-18T18:39:20.000Z
agentTools:
  projectIndex: https://stockpit.readme.io/llms.txt
---

# Mutations

See the [Queries](/reference/purchase-receipt-queries) page for a presentation of this resource.

## UpdatePurchaseReceipt

Update a purchase receipt

### Parameters

| id <span style={{ fontWeight: "normal" }}>- [ID](/reference/data-types#id) </span> |
| :--------------------------------------------------------------------------------- |
| Id of the purchase receipt                                                         |

| input <span style={{ fontWeight: "normal" }}>- [PurchaseReceiptInput](/reference/purchase-receipt-mutations#purchasereceiptinput-data-type) </span> |
| :-------------------------------------------------------------------------------------------------------------------------------------------------- |
| Data of the purchase receipt                                                                                                                        |

### Example

```graphql
mutation UpdatePurchaseReceipt($id: ID!, $input: PurchaseReceiptInput!) {
  UpdatePurchaseReceipt(id: $id, input: $input) {
    id
    shipping_cost
  }
}
```

```json Variables (JSON)
{
  "id": 100009,
  "input": {
    "shipping_cost": 11.5
  }
}
```

### Returned data

```json
{
  "data": {
    "UpdatePurchaseReceipt": {
      "id": 100009,
      "shipping_cost": 11.5
    }
  }
}
```

## DeletePurchaseReceipt

Delete the purchase receipt

### Parameters

| id <span style={{ fontWeight: "normal" }}>- [ID](/reference/data-types#id) </span> |
| :--------------------------------------------------------------------------------- |
| Id of the purchase receipt                                                         |

### Example

```graphql
mutation DeletePurchaseReceipt($id: ID!) {
  DeletePurchaseReceipt(id: $id)
}
```

```json Variables (JSON)
{
  "id": 100009
}
```

### Returned data

```json
{
  "data": {
    "DeletePurchaseReceipt": true
  }
}
```

## PurchaseReceiptInput data type

| id <span style={{ fontWeight: "normal" }}>- [Int](/reference/data-types#int) </span> |
| :----------------------------------------------------------------------------------- |
| Unique identifier of the purchase receipt                                            |

| label <span style={{ fontWeight: "normal" }}>- [String](/reference/data-types#string)</span> |
| :------------------------------------------------------------------------------------------- |
| Title of the purchase receipt                                                                |

| total\_units <span style={{ fontWeight: "normal" }}>- [Float](/reference/data-types#float)</span> |
| :------------------------------------------------------------------------------------------------ |
| Total units of the purchase receipt                                                               |

| status <span style={{ fontWeight: "normal" }}>- [Enum](/reference/data-types#enum)</span>   |
| :------------------------------------------------------------------------------------------ |
| Status of the purchase receipt (enum values :  pending, cancelled, delivered, unpublished). |

| supplier <span style={{ fontWeight: "normal" }}>- [SupplierInput](/reference/supplier-queries) - Subquery</span> |
| :--------------------------------------------------------------------------------------------------------------- |
| Supplier of the purchase receipt                                                                                 |

| line\_items <span style={{ fontWeight: "normal" }}>- [LineItemPurchaseReceiptInput](/reference/line-item-queries#lineitempurchasereceiptinput-data-type) - Subquery</span> |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| List of the line items of the purchase receipt                                                                                                                             |

| dated\_at <span style={{ fontWeight: "normal" }}>- [Date](/reference/data-types#date)</span> |
| :------------------------------------------------------------------------------------------- |
| Date of the purchase receipt                                                                 |

| created\_at <span style={{ fontWeight: "normal" }}>- [DateTime](/reference/data-types#datetime)</span> |
| :----------------------------------------------------------------------------------------------------- |
| Creation date of the purchase receipt                                                                  |

| shipping\_at <span style={{ fontWeight: "normal" }}>- [Date](/reference/data-types#date)</span> |
| :---------------------------------------------------------------------------------------------- |
| Date the shipping is planned                                                                    |

| shipping\_cost <span style={{ fontWeight: "normal" }}>- [Float](/reference/data-types#float)</span> |
| :-------------------------------------------------------------------------------------------------- |
| Shipping costs of the purchase receipt                                                              |