Skip to main content

Add an adjustment

POST /v1/items/quantitylimits/adjustments

Records a single, unique point-of-sale (POS) transaction in FoodStorm and adjusts corresponding Quantity Limit totals against menu items in FoodStorm. You can send multiple requests (one transaction per request) at the same time.

tip

Post the POS transactions in real-time rather than in scheduled batches to improve the accuracy of order matching and stock adjustments.

Before making a requested adjustment, the matching system assesses whether a corresponding order in FoodStorm has already accounted for the adjustment. In the request response, the note field contains the match result as one of: No match or Matched order <number> for transaction id <number>. For more information about matching, see Adjustments.

Security

NameInDescription
AuthorizationheaderStandard Authorization header using the Bearer scheme. Example: "bearer {token}"

Parameters

None.

Request

All item_id values in the items array must have a matching item in the FoodStorm OMS. If an item_id value is not found, the request returns an error.

FieldTypeRequiredDescription
itemsArray(Items)Required

Menu items purchased within the same POS transaction.

site_codestringRequired

The unique site identifier of the store where the POS transaction occurred.

adjustment_reasonstringRequired

The type of adjustment. If the adjustment_amount is negative, specify "external_sale". If the adjustment_amount is positive, specify “external_refund”.

adjustment_datetimestringRequired

The timestamp of the physical POS transaction. Value must be in UTC and ISO8601 format as per contract. For example: 2022-03-09T11:37:00-5:00 or 2022-03-09T16:37:00Z.

transactionHashRequired

The transaction details for the adjustment.

Items Object

FieldTypeRequiredDescription
item_idstringRequired

The scanned barcode, which represents a physical product (e.g. turkey).

adjustment_amountintegerRequired

The number of units sold for the given item_id in this POS transaction.

Transaction Object

FieldTypeRequiredDescription
idstringOptional

Unique identifier of a physical POS transaction.

Request Examples

curl --request POST \
--url https://connect.instacart.com/v1/items/quantitylimits/adjustments \
--header 'Accept: application/json' \
--header 'Authorization: string' \
--header 'Content-Type: application/json' \
--data '{
"items": [
{
"item_id": "string",
"adjustment_amount": 1
}
],
"site_code": "string",
"adjustment_reason": "string",
"adjustment_datetime": "string",
"transaction": {
"id": "string"
}
}'

Response

FieldTypeRequiredDescription
itemsArray(Items)Required

Menu items purchased within the same POS transaction.

site_codestringRequired

The unique site identifier that will be sent to FoodStorm.

adjustment_reasonstringRequired

Allowed values are "external_sale" or "external_refund".

adjustment_datetimestringRequired

Timestamp of a physical POS transaction. Value must be in ISO8601 format.

matched_order_nostringOptional

The order number which matches the given POS transaction.

transactionHashRequired

The transaction details for the adjustment.

notestringRequired

Brief on the adjustment outcome.

Items Object

FieldTypeRequiredDescription
item_idstringRequired

The scanned barcode, which represents a physical product (e.g. turkey).

adjustment_amountintegerRequired

The number of units sold for the given item_id in this POS transaction.

Transaction Object

FieldTypeRequiredDescription
idstringOptional

Unique identifier of a physical POS transaction.

Response Examples

200 Success

{
"items": [
{
"item_id": "0028065123",
"adjustment_amount": -2
},
{
"item_id": "0031546396",
"adjustment_amount": -1
}
],
"site_code": "S2",
"adjustment_reason": "external_sale",
"adjustment_datetime": "2023-11-03T12:01:20.2842433+11:00",
"transaction": {
"id": "123123"
},
"note": "no matching order found. negative adjustment applied"
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Item Category Not Found""""Not applicable