# ServiceShipment

ServiceShipment

## List external workshops

> Get a list of external workshops for a tenant.\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ExternalWorkshopListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ExternalWorkshopResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}},"schemas":{"ExternalWorkshopResponseSchema":{"title":"ExternalWorkshopResponseSchema","type":"object","properties":{"externalWorkshopUid":{"$ref":"#/components/schemas/UID"},"companyName":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"phone":{"type":"string"},"contactName":{"type":"string"},"note":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["externalWorkshopUid","companyName","address","postalCode","city","countryCode","email","phone","contactName","note","active","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"EmailTYPE":{"title":"Email","type":"string"},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}}},"paths":{"/tenants/{tenantUid}/serviceorders/externalworkshops":{"get":{"summary":"List external workshops","responses":{"200":{"$ref":"#/components/responses/ExternalWorkshopListResponse"}},"operationId":"get-tenants-externalworkshops","description":"Get a list of external workshops for a tenant.\n\nRequired permissions: SERVICE_ORDER","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"tags":["ServiceShipment"]}}}}
```

## Create new external workshop

> Create a new external workshop for a tenant.\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ExternalWorkshopResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalWorkshopResponseSchema"}}}}},"schemas":{"ExternalWorkshopResponseSchema":{"title":"ExternalWorkshopResponseSchema","type":"object","properties":{"externalWorkshopUid":{"$ref":"#/components/schemas/UID"},"companyName":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"phone":{"type":"string"},"contactName":{"type":"string"},"note":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["externalWorkshopUid","companyName","address","postalCode","city","countryCode","email","phone","contactName","note","active","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"EmailTYPE":{"title":"Email","type":"string"},"ExternalWorkshopCreateSchema":{"title":"ExternalWorkshopCreateSchema","type":"object","properties":{"companyName":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"phone":{"type":"string"},"contactName":{"type":"string"},"note":{"type":"string"},"active":{"type":"boolean","default":true},"externalWorkshopUid":{"$ref":"#/components/schemas/UID"}},"required":["companyName"]}},"requestBodies":{"ExternalWorkshopCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalWorkshopCreateSchema"}}}}}},"paths":{"/tenants/{tenantUid}/serviceorders/externalworkshops":{"post":{"summary":"Create new external workshop","operationId":"post-externalworkshop","responses":{"201":{"$ref":"#/components/responses/ExternalWorkshopResponse"}},"description":"Create a new external workshop for a tenant.\n\nRequired permissions: SERVICE_ORDER","requestBody":{"$ref":"#/components/requestBodies/ExternalWorkshopCreateRequest"},"tags":["ServiceShipment"]}}}}
```

## Get external workshop

> Get a given external workshop.\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ExternalWorkshopResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalWorkshopResponseSchema"}}}}},"schemas":{"ExternalWorkshopResponseSchema":{"title":"ExternalWorkshopResponseSchema","type":"object","properties":{"externalWorkshopUid":{"$ref":"#/components/schemas/UID"},"companyName":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"phone":{"type":"string"},"contactName":{"type":"string"},"note":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["externalWorkshopUid","companyName","address","postalCode","city","countryCode","email","phone","contactName","note","active","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"EmailTYPE":{"title":"Email","type":"string"}}},"paths":{"/tenants/{tenantUid}/serviceorders/externalworkshops/{externalWorkshopUid}":{"get":{"summary":"Get external workshop","responses":{"200":{"$ref":"#/components/responses/ExternalWorkshopResponse"}},"operationId":"get-externalworkshop","description":"Get a given external workshop.\n\nRequired permissions: SERVICE_ORDER","tags":["ServiceShipment"]}}}}
```

## Update external workshop

> Update an external workshop.\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ExternalWorkshopResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalWorkshopResponseSchema"}}}}},"schemas":{"ExternalWorkshopResponseSchema":{"title":"ExternalWorkshopResponseSchema","type":"object","properties":{"externalWorkshopUid":{"$ref":"#/components/schemas/UID"},"companyName":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"phone":{"type":"string"},"contactName":{"type":"string"},"note":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["externalWorkshopUid","companyName","address","postalCode","city","countryCode","email","phone","contactName","note","active","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"EmailTYPE":{"title":"Email","type":"string"},"ExternalWorkshopUpdateSchema":{"title":"ExternalWorkshopUpdateSchema","type":"object","properties":{"companyName":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"phone":{"type":"string"},"contactName":{"type":"string"},"note":{"type":"string"},"active":{"type":"boolean","default":true}}}},"requestBodies":{"ExternalWorkshopUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalWorkshopUpdateSchema"}}}}}},"paths":{"/tenants/{tenantUid}/serviceorders/externalworkshops/{externalWorkshopUid}":{"put":{"summary":"Update external workshop","operationId":"put-externalworkshop","responses":{"200":{"$ref":"#/components/responses/ExternalWorkshopResponse"}},"description":"Update an external workshop.\n\nRequired permissions: SERVICE_ORDER","requestBody":{"$ref":"#/components/requestBodies/ExternalWorkshopUpdateRequest"},"tags":["ServiceShipment"]}}}}
```

## Delete external workshop

> Delete an external workshop.\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/serviceorders/externalworkshops/{externalWorkshopUid}":{"delete":{"summary":"Delete external workshop","operationId":"delete-externalworkshop","description":"Delete an external workshop.\n\nRequired permissions: SERVICE_ORDER","responses":{"204":{"description":"No Content"}},"tags":["ServiceShipment"]}}}}
```

## List service shipments

> List service shipments.\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ServiceShipmentListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceShipmentResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}},"schemas":{"ServiceShipmentResponseSchema":{"title":"ServiceShipmentResponseSchema","type":"object","properties":{"serviceShipmentUid":{"$ref":"#/components/schemas/UID"},"sender":{"$ref":"#/components/schemas/ServiceShipmentSenderSchema"},"receiver":{"$ref":"#/components/schemas/ServiceShipmentReceiverResponseSchema"},"status":{"$ref":"#/components/schemas/ServiceShipmentStatusENUM"},"note":{"type":"string"},"trackingNumber":{"type":"string"},"shipmentNumber":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceShipmentItemResponseSchema"}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"shipmentDate":{"type":"string","format":"date-time"},"allReceived":{"type":"boolean"}},"required":["serviceShipmentUid","sender","receiver","status","note","trackingNumber","shipmentNumber","items","createdBy","createdAt","lastModifiedBy","lastModifiedAt","shipmentDate","allReceived"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ServiceShipmentSenderSchema":{"title":"ServiceShipmentSenderSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid"]},"ServiceShipmentReceiverResponseSchema":{"title":"ServiceShipmentReceiverSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"externalWorkshopUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid","externalWorkshopUid"]},"ServiceShipmentStatusENUM":{"title":"ServiceShipmentStatusENUM","type":"string","enum":["NOT_SENT","IN_TRANSIT","RECEIVED"]},"ServiceShipmentItemResponseSchema":{"title":"ServiceShipmentItemResponseSchema","type":"object","properties":{"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"receivedDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["serviceOrderUid","receivedDate","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}}},"paths":{"/tenants/{tenantUid}/serviceorders/shipments":{"get":{"summary":"List service shipments","responses":{"200":{"$ref":"#/components/responses/ServiceShipmentListResponse"}},"operationId":"get-service-shipments","description":"List service shipments.\n\nRequired permissions: SERVICE_ORDER","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"tags":["ServiceShipment"]}}}}
```

## Create new service shipment

> Create new service shipment. For receiver, either a store or an external workshop must be set (by its UID).\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ServiceShipmentResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceShipmentResponseSchema"}}}}},"schemas":{"ServiceShipmentResponseSchema":{"title":"ServiceShipmentResponseSchema","type":"object","properties":{"serviceShipmentUid":{"$ref":"#/components/schemas/UID"},"sender":{"$ref":"#/components/schemas/ServiceShipmentSenderSchema"},"receiver":{"$ref":"#/components/schemas/ServiceShipmentReceiverResponseSchema"},"status":{"$ref":"#/components/schemas/ServiceShipmentStatusENUM"},"note":{"type":"string"},"trackingNumber":{"type":"string"},"shipmentNumber":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceShipmentItemResponseSchema"}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"shipmentDate":{"type":"string","format":"date-time"},"allReceived":{"type":"boolean"}},"required":["serviceShipmentUid","sender","receiver","status","note","trackingNumber","shipmentNumber","items","createdBy","createdAt","lastModifiedBy","lastModifiedAt","shipmentDate","allReceived"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ServiceShipmentSenderSchema":{"title":"ServiceShipmentSenderSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid"]},"ServiceShipmentReceiverResponseSchema":{"title":"ServiceShipmentReceiverSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"externalWorkshopUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid","externalWorkshopUid"]},"ServiceShipmentStatusENUM":{"title":"ServiceShipmentStatusENUM","type":"string","enum":["NOT_SENT","IN_TRANSIT","RECEIVED"]},"ServiceShipmentItemResponseSchema":{"title":"ServiceShipmentItemResponseSchema","type":"object","properties":{"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"receivedDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["serviceOrderUid","receivedDate","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]},"ServiceShipmentCreateSchema":{"title":"ServiceShipmentCreateSchema","allOf":[{"$ref":"#/components/schemas/ServiceShipmentUpdateSchema"},{"type":"object","properties":{"serviceShipmentUid":{"$ref":"#/components/schemas/OptionalUID"}}}]},"ServiceShipmentUpdateSchema":{"title":"ServiceShipmentUpdateSchema","type":"object","properties":{"sender":{"$ref":"#/components/schemas/ServiceShipmentSenderSchema"},"receiver":{"$ref":"#/components/schemas/ServiceShipmentReceiverUpdateSchema"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/ServiceShipmentStatusENUM"},"trackingNumber":{"type":"string"},"shipmentNumber":{"type":"string"},"shipmentDate":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceShipmentItemUpdateSchema"}}},"required":["sender","receiver"]},"ServiceShipmentReceiverUpdateSchema":{"title":"ServiceShipmentReceiverUpdateSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"externalWorkshopUid":{"$ref":"#/components/schemas/OptionalUID"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"ServiceShipmentItemUpdateSchema":{"title":"ServiceShipmentItemUpdateSchema","type":"object","properties":{"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"receivedDate":{"type":"string","format":"date-time"}},"required":["serviceOrderUid"]}},"requestBodies":{"ServiceShipmentCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceShipmentCreateSchema"}}}}}},"paths":{"/tenants/{tenantUid}/serviceorders/shipments":{"post":{"summary":"Create new service shipment","operationId":"post-service-shipment","responses":{"201":{"$ref":"#/components/responses/ServiceShipmentResponse"}},"description":"Create new service shipment. For receiver, either a store or an external workshop must be set (by its UID).\n\nRequired permissions: SERVICE_ORDER","requestBody":{"$ref":"#/components/requestBodies/ServiceShipmentCreateRequest"},"tags":["ServiceShipment"]}}}}
```

## Get service shipment

> Get service shipment.\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ServiceShipmentResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceShipmentResponseSchema"}}}}},"schemas":{"ServiceShipmentResponseSchema":{"title":"ServiceShipmentResponseSchema","type":"object","properties":{"serviceShipmentUid":{"$ref":"#/components/schemas/UID"},"sender":{"$ref":"#/components/schemas/ServiceShipmentSenderSchema"},"receiver":{"$ref":"#/components/schemas/ServiceShipmentReceiverResponseSchema"},"status":{"$ref":"#/components/schemas/ServiceShipmentStatusENUM"},"note":{"type":"string"},"trackingNumber":{"type":"string"},"shipmentNumber":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceShipmentItemResponseSchema"}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"shipmentDate":{"type":"string","format":"date-time"},"allReceived":{"type":"boolean"}},"required":["serviceShipmentUid","sender","receiver","status","note","trackingNumber","shipmentNumber","items","createdBy","createdAt","lastModifiedBy","lastModifiedAt","shipmentDate","allReceived"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ServiceShipmentSenderSchema":{"title":"ServiceShipmentSenderSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid"]},"ServiceShipmentReceiverResponseSchema":{"title":"ServiceShipmentReceiverSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"externalWorkshopUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid","externalWorkshopUid"]},"ServiceShipmentStatusENUM":{"title":"ServiceShipmentStatusENUM","type":"string","enum":["NOT_SENT","IN_TRANSIT","RECEIVED"]},"ServiceShipmentItemResponseSchema":{"title":"ServiceShipmentItemResponseSchema","type":"object","properties":{"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"receivedDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["serviceOrderUid","receivedDate","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]}}},"paths":{"/tenants/{tenantUid}/serviceorders/shipments/{serviceShipmentUid}":{"get":{"summary":"Get service shipment","responses":{"200":{"$ref":"#/components/responses/ServiceShipmentResponse"}},"operationId":"get-service-shipment","description":"Get service shipment.\n\nRequired permissions: SERVICE_ORDER","tags":["ServiceShipment"]}}}}
```

## Update service shipment

> Update service shipment. For receiver, either a store or an external workshop must be set (by its UID).\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ServiceShipmentResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceShipmentResponseSchema"}}}}},"schemas":{"ServiceShipmentResponseSchema":{"title":"ServiceShipmentResponseSchema","type":"object","properties":{"serviceShipmentUid":{"$ref":"#/components/schemas/UID"},"sender":{"$ref":"#/components/schemas/ServiceShipmentSenderSchema"},"receiver":{"$ref":"#/components/schemas/ServiceShipmentReceiverResponseSchema"},"status":{"$ref":"#/components/schemas/ServiceShipmentStatusENUM"},"note":{"type":"string"},"trackingNumber":{"type":"string"},"shipmentNumber":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceShipmentItemResponseSchema"}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"shipmentDate":{"type":"string","format":"date-time"},"allReceived":{"type":"boolean"}},"required":["serviceShipmentUid","sender","receiver","status","note","trackingNumber","shipmentNumber","items","createdBy","createdAt","lastModifiedBy","lastModifiedAt","shipmentDate","allReceived"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ServiceShipmentSenderSchema":{"title":"ServiceShipmentSenderSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid"]},"ServiceShipmentReceiverResponseSchema":{"title":"ServiceShipmentReceiverSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"externalWorkshopUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid","externalWorkshopUid"]},"ServiceShipmentStatusENUM":{"title":"ServiceShipmentStatusENUM","type":"string","enum":["NOT_SENT","IN_TRANSIT","RECEIVED"]},"ServiceShipmentItemResponseSchema":{"title":"ServiceShipmentItemResponseSchema","type":"object","properties":{"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"receivedDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["serviceOrderUid","receivedDate","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]},"ServiceShipmentUpdateSchema":{"title":"ServiceShipmentUpdateSchema","type":"object","properties":{"sender":{"$ref":"#/components/schemas/ServiceShipmentSenderSchema"},"receiver":{"$ref":"#/components/schemas/ServiceShipmentReceiverUpdateSchema"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/ServiceShipmentStatusENUM"},"trackingNumber":{"type":"string"},"shipmentNumber":{"type":"string"},"shipmentDate":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceShipmentItemUpdateSchema"}}},"required":["sender","receiver"]},"ServiceShipmentReceiverUpdateSchema":{"title":"ServiceShipmentReceiverUpdateSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/OptionalUID"},"externalWorkshopUid":{"$ref":"#/components/schemas/OptionalUID"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"ServiceShipmentItemUpdateSchema":{"title":"ServiceShipmentItemUpdateSchema","type":"object","properties":{"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"receivedDate":{"type":"string","format":"date-time"}},"required":["serviceOrderUid"]}},"requestBodies":{"ServiceShipmentUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceShipmentUpdateSchema"}}}}}},"paths":{"/tenants/{tenantUid}/serviceorders/shipments/{serviceShipmentUid}":{"put":{"summary":"Update service shipment","operationId":"put-service-shipment","responses":{"200":{"$ref":"#/components/responses/ServiceShipmentResponse"}},"description":"Update service shipment. For receiver, either a store or an external workshop must be set (by its UID).\n\nRequired permissions: SERVICE_ORDER","requestBody":{"$ref":"#/components/requestBodies/ServiceShipmentUpdateRequest"},"tags":["ServiceShipment"]}}}}
```

## Delete service shipment

> Delete service shipment\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/serviceorders/shipments/{serviceShipmentUid}":{"delete":{"summary":"Delete service shipment","operationId":"delete-service-shipment","responses":{"204":{"description":"No Content"}},"description":"Delete service shipment\n\nRequired permissions: SERVICE_ORDER","tags":["ServiceShipment"]}}}}
```

## Get service shipments for a service order

> Get service shipment for a service order\
> \
> Required permissions: SERVICE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"ServiceShipment","description":"ServiceShipment"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"ServiceShipmentListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceShipmentResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}},"schemas":{"ServiceShipmentResponseSchema":{"title":"ServiceShipmentResponseSchema","type":"object","properties":{"serviceShipmentUid":{"$ref":"#/components/schemas/UID"},"sender":{"$ref":"#/components/schemas/ServiceShipmentSenderSchema"},"receiver":{"$ref":"#/components/schemas/ServiceShipmentReceiverResponseSchema"},"status":{"$ref":"#/components/schemas/ServiceShipmentStatusENUM"},"note":{"type":"string"},"trackingNumber":{"type":"string"},"shipmentNumber":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceShipmentItemResponseSchema"}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"shipmentDate":{"type":"string","format":"date-time"},"allReceived":{"type":"boolean"}},"required":["serviceShipmentUid","sender","receiver","status","note","trackingNumber","shipmentNumber","items","createdBy","createdAt","lastModifiedBy","lastModifiedAt","shipmentDate","allReceived"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ServiceShipmentSenderSchema":{"title":"ServiceShipmentSenderSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid"]},"ServiceShipmentReceiverResponseSchema":{"title":"ServiceShipmentReceiverSchema","type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"externalWorkshopUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid","externalWorkshopUid"]},"ServiceShipmentStatusENUM":{"title":"ServiceShipmentStatusENUM","type":"string","enum":["NOT_SENT","IN_TRANSIT","RECEIVED"]},"ServiceShipmentItemResponseSchema":{"title":"ServiceShipmentItemResponseSchema","type":"object","properties":{"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"receivedDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}},"required":["serviceOrderUid","receivedDate","createdAt","createdBy","lastModifiedAt","lastModifiedBy"]},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}}},"paths":{"/tenants/{tenantUid}/serviceorders/shipments/items/{serviceOrderUid}":{"get":{"summary":"Get service shipments for a service order","responses":{"200":{"$ref":"#/components/responses/ServiceShipmentListResponse"}},"operationId":"get-service-shipments-serviceOrderUid","description":"Get service shipment for a service order\n\nRequired permissions: SERVICE_ORDER","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"requestBody":{"content":{}},"tags":["ServiceShipment"]}}}}
```
