API Reference

UpdatePurchaseReceipt

Update a purchase receipt

Parameters

id - ID
Id of the purchase receipt
input - PurchaseReceiptInput
Data of the purchase receipt

Example

mutation UpdatePurchaseReceipt($id: ID!, $input: PurchaseReceiptInput!) {
  UpdatePurchaseReceipt(id: $id, input: $input) {
    id
    shipping_cost
  }
}
{
  "id": 100009,
  "input": {
    "shipping_cost": 11.5
  }
}

Returned data

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

DeletePurchaseReceipt

Delete the purchase receipt

Parameters

id - ID
Id of the purchase receipt

Example

mutation DeletePurchaseReceipt($id: ID!) {
  DeletePurchaseReceipt(id: $id)
}
{
  "id": 100009
}

Returned data

{
  "data": {
    "DeletePurchaseReceipt": true
  }
}

PurchaseReceiptInput data type

id - Int
Unique identifier of the purchase receipt
label - String
Title of the purchase receipt
total_units - Float
Total units of the purchase receipt
status - Enum
Status of the purchase receipt (enum values : pending, cancelled, delivered, unpublished).
dated_at - Date
Date of the purchase receipt
created_at - DateTime
Creation date of the purchase receipt
shipping_at - Date
Date the shipping is planned
shipping_cost - Float
Shipping costs of the purchase receipt
supplier - SupplierInput - Subquery
Supplier of the purchase receipt
line_items - LineItemInput - Subquery
List of the line items of the purchase receipt