Skip to content

Instantly share code, notes, and snippets.

@pzurek
Created June 2, 2016 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pzurek/c86b7e917ae1b6f76fb2fdf00b456255 to your computer and use it in GitHub Desktop.
Save pzurek/c86b7e917ae1b6f76fb2fdf00b456255 to your computer and use it in GitHub Desktop.
Vend sale payload explanation
{
"register_id": "b1e198a9-f019-11e3-a0f5-b8ca3a64f8f4", // register to assign the sale to
"customer_id": "06e35f89-3783-11e6-ec7e-13193f7bd2ed", // [optional] customer associated with the sale
"user_id": "b1ed6158-f019-11e3-a0f5-b8ca3a64f8f4", // Vend user associated with the sale
"sale_date": "2016-05-05 23:35:34", // [optional] by default current time will be assigned
"note": "", // [optional] a note to be attached to the sale
"status": "CLOSED", // One of: SAVED, CLOSED, ON_ACCOUNT, LAYBY, ON_ACCOUNT_CLOSED, LAYBY_CLOSED
"short_code": "mlzs94", // [optional] used for loyalty claiming
"invoice_number": "MR-1484-NZ", // [optional] invoice number, if omitted one will be assigned by Vend
"invoice_sequence": 1484, // [optional]
"register_sale_products": [{ // [optional] an array of line items, if updating a sale all existing products need to be included in the payload or they will be deleted
"product_id": "b1d87b58-f019-11e3-a0f5-b8ca3a64f8f4", // Vend product id
"register_id": "b1e198a9-f019-11e3-a0f5-b8ca3a64f8f4", // [optional] a product can be added on a different register than the sale was initially created
"sequence": "0", // [optional] order of the line item in the sale, safe to ignore
"quantity": 1, // qty
"price": 22, // unit price
"cost": 20, // [optional] cost to be used for margin calculations
"price_set": 0, // [optional] bool value describing if sale was modified manually
"discount": 0, // [optional] if the price was changes discount can be declared here for reporting
"loyalty_value": 0, // [optional] the value by which customer's loyalty balance should be increased
"tax": 3.3, // tax value
"tax_id": "b1d192bc-f019-11e3-a0f5-b8ca3a64f8f4", // tax id
"status": "CONFIRMED" // [optional] CONFIRMED is the only meaningful, non-default option. Makes it impossible to remove product from the sale
}],
"register_sale_payments": [{ // [optional] an array of payment objects
"register_id": "b1e198a9-f019-11e3-a0f5-b8ca3a64f8f4", // [optional] a payment can also be accepted in a sale different than the sale originate from
"retailer_payment_type_id": "b1e1d70e-f019-11e3-a0f5-b8ca3a64f8f4", // payment type id
"payment_date": "2016-05-05 23:35:34", // [optional] by default current time will be assigned
"amount": 20.3 // all the monies
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment