Service Orders

Add Service Order

post /serviceorders

Endpoint for adding service order in Sitoo Platform

REQUEST BODY
object
REQUIRED
Service Order Object
ServiceOrder
posthttps://api.mysitoo.com/v2/accounts/1500/serviceorders.json
{
"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
}
}
RESPONSE JSON
{
"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
201Returns the added Service Order object
400Invalid request. Data sent from client is invalid
401Missing or bad authentication
500Internal Server Error
502Service Not Available

Get Service Orders

get /serviceorders

Endpoint for getting service orders in Sitoo Platform

PARAMETERS
store
string
query

Filter on Store ID

state
array (string)
query

Filter on state of Service Orders, use comma as separator for multiple values

ServiceOrderState
Example: /serviceorders?state=new,in_progress
start_after_id
string
query

The service order ID to get subsequent service orders from, non inclusive

num
integer
query

The number of service orders to return

Default: 10
sort
string
query

Sort the result.

Default: "-created"
gethttps://api.mysitoo.com/v2/accounts/1500/serviceorders.json?store=STORE111&state=new,in_progress,service_done&start_after_id=1W7N3V258
RESPONSE JSON
[
{
"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
200Returns array of Service Order objects
400Invalid request. Data sent from client is invalid
401Missing or bad authentication
500Internal Server Error
502Service Not Available

Get Service Order

get /serviceorders/{service_order_id}

Endpoint for getting service order in Sitoo Platform

PARAMETERS
service_order_id
string
path
REQUIRED

The ID for the Service Order

gethttps://api.mysitoo.com/v2/accounts/1500/serviceorders/102DC4AA3.json
RESPONSE JSON
{
"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
200Returns the Service Order object
400Invalid request. Data sent from client is invalid
401Missing or bad authentication
500Internal Server Error
502Service 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.

PARAMETERS
service_order_id
string
path
REQUIRED

The ID for the Service Order

REQUEST BODY
object
REQUIRED
Service Order Object
ServiceOrder
puthttps://api.mysitoo.com/v2/accounts/1500/serviceorders/102DC4AA3.json
{
"state": "in_progress",
"revision": 1,
"author": {
"email": "anna@example.com",
"name": null,
"employee_id": null
}
}
RESPONSE JSON
{
"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
200Returns the Service Order object
400Invalid request. Data sent from client is invalid
401Missing or bad authentication
412Precondition Failed
500Internal Server Error
502Service Not Available

Objects

ServiceCustomer
object

The Service Customer

PROPERTIES
first_name
string
REQUIRED

First name of the customer

last_name
string

Last name of the customer

email
string

Email for the customer

mobile
string

Mobile phone number for the customer

ServiceItem
object

The Service Item being applied to the product

PROPERTIES
sku
string
REQUIRED

The stock keeping unit (SKU) for this item

name
string
REQUIRED

The name for this item

quantity
integer
REQUIRED

The quantity of this item

unit_price
string

Unit price including VAT

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$
cost_share
number

Reflects how much the customer pays in percentage (0-100) of the total_price

Minimum: 0
Maximum: 100
note
string
REQUIRED

A note to describe this service item

ServiceOrder
object

The Service Order

PROPERTIES
version
string
READ ONLY

The version of the data structure in the format "MAJOR.MINOR"

id
string
READ ONLY

A globally unique id that is used for identifying the service order

revision
integer

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.

created
integer
READ ONLY

Timestamp when the service order was created

modified
integer
READ ONLY

Timestamp when the service order was modified

store
REQUIRED

The store that the service order belongs to

id
string
REQUIRED

The ID for the store, e.g. Store Number (external ID of the Store in Sitoo)

name
string
REQUIRED

The name of the store

owner
REQUIRED

The user that is responsible for the service order

email
string
REQUIRED

Email for the user

name
string

Name for the user

employee_id
string

Employee ID for the user

customer
REQUIRED

The customer for the service order

first_name
string
REQUIRED

First name of the customer

last_name
string

Last name of the customer

email
string

Email for the customer

mobile
string

Mobile phone number for the customer

currency
string
REQUIRED

Currency for the service order (ISO 4217, alpha-3 uppercased)

note
string

The note set on the service order

product
REQUIRED

The product being serviced

sku
string
REQUIRED

The stock keeping unit (SKU) for this product

name
string
REQUIRED

The name of this product

serial
string

A serial number for the product

services
array
REQUIRED

An array with service items for this product

PROPERTIES
sku
string
name
string
quantity
integer
unit_price
string
cost_share
number
note
string
author
REQUIRED

The user that created the revision

email
string
REQUIRED

Email for the user

name
string

Name for the user

employee_id
string

Employee ID for the user

ServiceOrderState
string

The state of the service order

  • new New
  • in_progress In Progress
  • service_done Service Done
  • closed Closed
  • cancelled Cancelled

ServiceProduct
object

The Service Product

PROPERTIES
sku
string
REQUIRED

The stock keeping unit (SKU) for this product

name
string
REQUIRED

The name of this product

serial
string

A serial number for the product

services
array
REQUIRED

An array with service items for this product

ServiceStore
object

The Service Store

PROPERTIES
id
string
REQUIRED

The ID for the store, e.g. Store Number (external ID of the Store in Sitoo)

name
string
REQUIRED

The name of the store

ServiceUser
object

The Service User

PROPERTIES
email
string
REQUIRED

Email for the user

name
string

Name for the user

employee_id
string

Employee ID for the user