Sales with Services
Sales with Services
To create sales with services, the sale creation request payload must contain the service_fields
attribute. The following attributes are accepted inside the service_fields
:
-
service_action
- Indicates which service action to take -
service_agenda
- Indicates the service agenda details -
service_item
- Indicates the service item details and location
{
"service_fields": {
"service_action": "CREATE_JOB",
"service_agenda": {
"date": "2023-01-01 23:35:34",
"minutes_scheduled": 60
},
"service_item": {
"item_details": {
"item_id": "06e35f89-3783-11e6-ec7e-13193f7bd2ed",
"item_name": "Red bike",
"serial_number": "1F5SAA2",
"description": "Red mountain bike, with brakes on the left side of the handlebars",
"initial_condition": "Broken seat"
},
"location": "Shelf 1"
}
}
}
Full payload with service fields
Following is a payload with the attributes that can be used to create a sale with service fields.
{
"register_id": "b1e198a9-f019-11e3-a0f5-b8ca3a64f8f4",
"customer_id": "06e35f89-3783-11e6-ec7e-13193f7bd2ed",
"user_id": "b1ed6158-f019-11e3-a0f5-b8ca3a64f8f4",
"outlet_id": "348fff91-8c43-4599-812b-13636760895a",
"sale_date": "2016-05-05 23:35:34",
"note": "",
"status": "LAYBY",
"short_code": "mlzs94",
"invoice_number": "MR-1484-NZ",
"invoice_sequence": 1484,
"register_sale_products": [
{
"product_id": "b1d87b58-f019-11e3-a0f5-b8ca3a64f8f4",
"register_id": "b1e198a9-f019-11e3-a0f5-b8ca3a64f8f4",
"sequence": "0",
"quantity": 1,
"price": 22,
"cost": 20,
"price_set": 0,
"discount": 0,
"loyalty_value": 0,
"tax": 3.3,
"tax_id": "b1d192bc-f019-11e3-a0f5-b8ca3a64f8f4",
"status": "CONFIRMED"
}
],
"register_sale_payments": [
{
"register_id": "b1e198a9-f019-11e3-a0f5-b8ca3a64f8f4",
"retailer_payment_type_id": "b1e1d70e-f019-11e3-a0f5-b8ca3a64f8f4",
"payment_date": "2016-05-05 23:35:34",
"amount": 5
}
],
"service_fields": {
"service_action": "CREATE_JOB",
"service_agenda": {
"date": "2016-05-05 23:35:34",
"minutes_scheduled": 60
},
"service_item": {
"item_details": {
"item_id": "06e35f89-3783-11e6-ec7e-13193f7bd2ed",
"item_name": "Red bike",
"serial_number": "1F5SAA2",
"description": "Red mountain bike, with brakes on the left side of the handlebars",
"initial_condition": "Broken seat"
},
"location": "Shelf 1"
}
}
}
Definitions
The sale object
Visit Sales 101 for the sale object attribute definitions.
The service fields object
Attribute | Sample Value | Req/Opt | Description |
---|---|---|---|
service_action | "CREATE_JOB" | required | Action to take: CREATE_JOB , UPDATE_JOB . |
service_agenda | See below | optional | Service duration and schedule. |
service_item | See below | optional | Service item and location. |
The service agenda in service fields object
Attribute | Sample Value | Req/Opt | Description |
---|---|---|---|
date | "2016-05-05 23:35:34" | required | Date on which the service is going to be processed. |
minutes_scheduled | 60 | required | Amount of time in minutes required to finish the service. |
The service item in service fields object
Attribute | Sample Value | Req/Opt | Description |
---|---|---|---|
item_details | See below | optional | Details of the item |
location | "Shelf 1" | optional | Location of the item or service |
The item details in service item object
Attribute | Sample Value | Req/Opt | Description |
---|---|---|---|
item_id | "b1e198a9-f019-11e3-a0f5-b8ca3a64f8f4" | optional | id of an already existing item |
item_name | "Red bike" | optional | Item name |
serial_number | "1F5SAA2" | optional | Item serial number |
description | "Red mountain bike, with brakes on the left side of the handlebars" | optional | Item description |
initial_condition | "Broken seat" | optional | Item's initial condition |
Updated about 1 year ago