Inventory

Inventory Orders

An InventoryOrder represents an order for inventory stock.

The InventoryOrder object

Attributes

  • iduuidrequired

    The ID of the inventory order.

  • statusstringrequired

    The status of the inventory order.

    Possible values:draftsubmittedreceived
  • purchase_order_numberstringoptional

    The purchase order number for this inventory order.

  • supplier_iduuidrequired

    The ID of the supplier for this inventory order.

  • supplier_namestringrequired

    The name of the supplier for this inventory order.

  • supplier_emailstringrequired

    An email address for the supplier of this inventory order.

  • subtotalintegerrequired

    The subtotal of the order in the lowest denomination for this order's currency.

  • currencystringrequired

    The currency of the inventory order.

  • item_countintegerrequired

    The total number of items in the inventory order.

  • items_addedbooleanrequired

    Whether items have been added to the order.

  • created_by_iduuidrequirednullable

    The ID of the user who created the inventory order.

  • site_iduuidrequired

    The ID of the site this inventory order belongs to.

  • organisation_iduuidrequired

    The ID of the organisation this inventory order belongs to.

  • created_atdate-timerequired

    The date and time the inventory order was created.

  • updated_atdate-timerequired

    The date and time the inventory order was last updated.

  • submitted_atdate-timerequirednullable

    The date and time the inventory order was submitted.

  • last_submitted_atdate-timerequirednullable

    The date and time the inventory order was last submitted.

{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "draft",
  "purchase_order_number": "PO123",
  "supplier_id": "00000000-0000-0000-0000-000000000000",
  "supplier_name": "Elemis",
  "supplier_email": "orders@example.com",
  "subtotal": 2000,
  "currency": "gbp",
  "item_count": 10,
  "items_added": false,
  "created_by_id": "00000000-0000-0000-0000-000000000000",
  "site_id": "00000000-0000-0000-0000-000000000000",
  "organisation_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2024-06-01T12:00:00Z",
  "updated_at": "2024-06-01T12:00:00Z",
  "submitted_at": "2024-06-01T12:00:00Z",
  "last_submitted_at": "2024-06-02T12:00:00Z"
}
get/inventory/orders

List Inventory Orders

listInventoryOrders

This endpoint retrieves a list of all the inventory orders for the given site.

Query parameters

  • site_iduuidrequired

    Filter inventory products by site.

  • purchase_order_numberstringoptional

    A search query to filter inventory orders by the purchase order number.

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

Responses

  • 200

    The inventory orders were successfully retrieved

  • 401

    The user is unauthenticated

post/inventory/orders

Create an Inventory Order

createInventoryOrder

This endpoint creates an inventory order for the given site.

Request body

  • purchase_order_numberstringrequirednullable

    The purchase order number for this inventory order.

  • supplier_iduuidrequired

    Identifier of the supplier this order will be sent to. The supplier must belong to the same site as site_id; order line items can only reference inventory products that are linked to this supplier.

  • supplier_emailstringrequirednullable

    The email address of the supplier for this inventory order.

  • site_iduuidrequired

    Identifier of the site this inventory order is placed for. Goods will be received against this site's stock, and only users with access to this site can view or modify the order.

Responses

  • 201

    The inventory order was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 422

    The request didn't pass validation

get/inventory/orders/{orderId}

Show an Inventory Order

getInventoryOrder

This endpoint retrieves an inventory order for the given site.

Path parameters

  • orderIduuidrequired

    The ID of the InventoryOrder

Responses

  • 200

    The inventory order was successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

put/inventory/orders/{orderId}

Update an Inventory Order

updateInventoryOrder

This endpoint updates an inventory order for the given site.

Path parameters

  • orderIduuidrequired

    The ID of the InventoryOrder

Request body

Responses

  • 200

    The inventory order was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/inventory/orders/{orderId}

Delete an Inventory Order

deleteInventoryOrder

This endpoint deletes an inventory order for the given site.

Path parameters

  • orderIduuidrequired

    The ID of the InventoryOrder

Responses

  • 204

    The inventory order was successfully deleted.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/inventory/orders/{orderId}/submit

Submit an Inventory Order

createInventoryOrderSubmission

This endpoint submits an inventory order for the given site.

Path parameters

  • orderIduuidrequired

    The ID of the InventoryOrder

Responses

  • 200

    The inventory order with items was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/inventory/orders/{orderId}/receive

Receive an Inventory Order

createInventoryOrderReceipt

This endpoint receives an inventory order for the given site.

Path parameters

  • orderIduuidrequired

    The ID of the InventoryOrder

Responses

  • 200

    The inventory order with items was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

get/inventory/orders/{orderId}/items

List Inventory Order Items

listInventoryOrderItems

This endpoint retrieves a list of all the items for the given inventory order.

Path parameters

  • orderIduuidrequired

    The ID of the InventoryOrder

Query parameters

  • brand_idsstring[]optional

    A comma-separated list of brand IDs to retrieve inventory order items for.

  • category_idsstring[]optional

    A comma-separated list of category IDs to retrieve inventory order items for.

Responses

  • 200

    The inventory order items were successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

post/inventory/orders/{orderId}/items

Add an item to an Inventory Order

createInventoryOrderItem

This endpoint adds an item to an inventory order.

Path parameters

  • orderIduuidrequired

    The ID of the InventoryOrder

Request body

  • quantityintegerrequired

    The quantity of the inventory product being ordered.

  • unit_priceintegerrequired

    The unit price of the inventory product in the lowest denomination for the product's currency.

Responses

  • 201

    The inventory order item was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

put/inventory/orders/{orderId}/items/{orderItemId}

Update an Inventory Order Item

updateInventoryOrderItem

This endpoint updates an item for the given inventory order.

Path parameters

  • orderIduuidrequired

    The ID of the InventoryOrder

  • orderItemIduuidrequired

    The ID of the InventoryOrderItem

Request body

  • quantityintegeroptional

    The quantity of the inventory product being ordered.

  • unit_priceintegeroptional

    The unit price of the inventory product in the lowest denomination for the product's currency.

Responses

  • 200

    The inventory order item was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/inventory/orders/{orderId}/items/{orderItemId}

Delete an Inventory Order Item

deleteInventoryOrderItem

This endpoint deletes an item for the given inventory order.

Path parameters

  • orderIduuidrequired

    The ID of the InventoryOrder

  • orderItemIduuidrequired

    The ID of the InventoryOrderItem

Responses

  • 204

    The inventory order item was successfully deleted.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

get/inventory/orders/{orderId}/queue

Export an Inventory Order

actionQueueInventoryOrderExport

This endpoint queues an export of an inventory order for the given site.

Path parameters

  • orderIduuidrequired

    Identifier of the inventory order whose queued job status is being fetched. Queue endpoints return progress for async operations (sending, receiving, exporting); poll until the job completes.

Query parameters

  • site_iduuidrequired

    Filter the InventoryOrder by site.

  • brand_idsstring[]optional

    A comma-separated list of brand IDs to retrieve inventory order items for.

  • category_idsstring[]optional

    A comma-separated list of category IDs to retrieve inventory order items for.

Responses

  • 200

    The job was successfully queued

  • 400

    The request failed.

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found