Service Orders
Add Service Order
post /serviceordersEndpoint for adding service order in Sitoo Platform
Service Order Object
{ "state": "new", "store": { "id": "STORE111", "name": "Barlay Shoe Inc" }, "owner": { "email": "staff@example.com", "name": "Pete" }, "customer": { "first_name": "Erica", "last_name": "Swansson", "email": "erica@example.com", "mobile": "+46701112233" }, "currency": "SEK", "product": [ { "sku": "SHOE999", "name": "Barlay Shoe", "services": [ { "sku": "SERVICE_HEEL", "name": "Replace heel", "quantity": 1, "unit_price": "50.00", "cost_share": 0, "note": "Left foot" } ] } ], "author": { "email": "anna@example.com", "name": null, "employee_id": null }}
{ "id": "102DC4AA3", "revision": 1, "created": 675645446, "modified": 675645531, "state": "new", "store": { "id": "STORE111", "name": "Barlay Shoe Inc" }, "owner": { "email": "staff@example.com", "name": "Pete", "employee_id": null }, "customer": { "first_name": "Erica", "last_name": "Swansson", "email": "erica@example.com", "mobile": "+46701112233" }, "currency": "SEK", "note": "", "product": { "sku": "SHOE999", "name": "Barlay Shoe", "serial": null, "services": [ { "sku": "SERVICE_HEEL", "name": "Replace heel", "quantity": 1, "unit_price": "50.00", "cost_share": 0, "note": "Left foot" } ] }, "author": { "email": "anna@example.com", "name": null, "employee_id": null }}
HTTP Status Code Summary | |
---|---|
201 | Returns the added Service Order object |
400 | Invalid request. Data sent from client is invalid |
401 | Missing or bad authentication |
500 | Internal Server Error |
502 | Service Not Available |
Get Service Orders
get /serviceordersEndpoint for getting service orders in Sitoo Platform
Filter on Store ID
Filter on state of Service Orders, use comma as separator for multiple values
The service order ID to get subsequent service orders from, non inclusive
The number of service orders to return
Sort the result.
- created
- -created
[ { "version": "1.0", "id": "102DC4AA3", "revision": 2, "created": 675645446, "modified": 675645531, "state": "new", "store": { "id": "STORE111", "name": "Barlay Shoe Inc" }, "owner": { "email": "staff@example.com", "name": "Pete", "employee_id": null }, "customer": { "first_name": "Erica", "last_name": "Swansson", "email": "erica@example.com", "mobile": "+46701112233" }, "currency": "SEK", "note": "The shoe has a broken heel.", "product": { "sku": "SHOE999", "name": "Barlay Shoe", "serial": "", "services": [ { "sku": "SERVICE_HEEL", "name": "Replace heel", "quantity": 1, "unit_price": null, "cost_share": 0, "note": "Left foot." }, { "sku": "SERVICE_POLISH", "name": "Polish Shoes", "quantity": 1, "unit_price": null, "cost_share": 0, "note": null } ] }, "author": { "email": "anna@example.com", "name": null, "employee_id": null } }]
HTTP Status Code Summary | |
---|---|
200 | Returns array of Service Order objects |
400 | Invalid request. Data sent from client is invalid |
401 | Missing or bad authentication |
500 | Internal Server Error |
502 | Service Not Available |
Get Service Order
get /serviceorders/{service_order_id}Endpoint for getting service order in Sitoo Platform
The ID for the Service Order
{ "version": "1.0", "id": "102DC4AA3", "revision": 2, "created": 675645446, "modified": 675645522, "state": "new", "store": { "id": "STORE111", "name": "Barlay Shoe Inc" }, "owner": { "email": "staff@example.com", "name": "Pete", "employee_id": null }, "customer": { "first_name": "Erica", "last_name": "Swansson", "email": "erica@example.com", "mobile": "+46701112233" }, "currency": "SEK", "note": "The shoe has a broken heel.", "product": { "sku": "SHOE999", "name": "Barlay Shoe", "serial": "", "services": [ { "sku": "SERVICE_HEEL", "name": "Replace heel", "quantity": 1, "unit_price": null, "cost_share": 0, "note": "Left foot." }, { "sku": "SERVICE_POLISH", "name": "Polish Shoes", "quantity": 1, "unit_price": null, "cost_share": 0, "note": null } ] }, "author": { "email": "anna@example.com", "name": null, "employee_id": null }}
HTTP Status Code Summary | |
---|---|
200 | Returns the Service Order object |
400 | Invalid request. Data sent from client is invalid |
401 | Missing or bad authentication |
500 | Internal Server Error |
502 | Service Not Available |
Update Service Order
put /serviceorders/{service_order_id}Endpoint for updating service order in Sitoo Platform. A HTTP response code of 412 means that the service order has been modified with a newer version and you need to read the latest data before updating again.
The ID for the Service Order
Service Order Object
{ "state": "in_progress", "revision": 1, "author": { "email": "anna@example.com", "name": null, "employee_id": null }}
{ "version": "1.0", "id": "102DC4AA3", "revision": 2, "created": 675645446, "modified": 675645511, "state": "in_progress", "store": { "id": "STORE111", "name": "Barlay Shoe Inc" }, "owner": { "email": "staff@example.com", "name": "Pete", "employee_id": null }, "customer": { "first_name": "Erica", "last_name": "Swansson", "email": "erica@example.com", "mobile": "+46701112233" }, "currency": "SEK", "note": "The shoe has a broken heel.", "product": { "sku": "SHOE999", "name": "Barlay Shoe", "serial": null, "services": [ { "sku": "SERVICE_HEEL", "name": "Replace heel", "quantity": 1, "unit_price": null, "cost_share": 0, "note": "Left foot." }, { "sku": "SERVICE_POLISH", "name": "Polish Shoes", "quantity": 1, "unit_price": null, "cost_share": 0, "note": "" } ] }, "author": { "email": "anna@example.com", "name": null, "employee_id": null }}
HTTP Status Code Summary | |
---|---|
200 | Returns the Service Order object |
400 | Invalid request. Data sent from client is invalid |
401 | Missing or bad authentication |
412 | Precondition Failed |
500 | Internal Server Error |
502 | Service Not Available |
Objects
ServiceCustomerobject
The Service Customer
First name of the customer
Last name of the customer
Email for the customer
Mobile phone number for the customer
ServiceItemobject
The Service Item being applied to the product
The stock keeping unit (SKU) for this item
The name for this item
The quantity of this item
Unit price including VAT
Reflects how much the customer pays in percentage (0-100) of the total_price
A note to describe this service item
ServiceOrderobject
The Service Order
The version of the data structure in the format "MAJOR.MINOR"
A globally unique id that is used for identifying the service order
Revision number of the service order. Must be the last revision for the service order on PUT, used to ensure data consistency. On POST, it must not be present.
Timestamp when the service order was created
Timestamp when the service order was modified
The store that the service order belongs to
The user that is responsible for the service order
The customer for the service order
Currency for the service order (ISO 4217, alpha-3 uppercased)
The note set on the service order
The product being serviced
The user that created the revision
ServiceOrderStatestring
The state of the service order
new
Newin_progress
In Progressservice_done
Service Doneclosed
Closedcancelled
Cancelled
ServiceProductobject
The Service Product
The stock keeping unit (SKU) for this product
The name of this product
A serial number for the product
An array with service items for this product
ServiceStoreobject
The Service Store
The ID for the store, e.g. Store Number (external ID of the Store in Sitoo)
The name of the store
ServiceUserobject
The Service User
Email for the user
Name for the user
Employee ID for the user