Przejdź do głównej zawartości

Make a warehouse virtual

POST
/warehouses.makeVirtual
curl --request POST \
--url https://api.sancho-wms.pl/v1/warehouses.makeVirtual \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "warehouseId": 1, "integrationId": 1, "sourceWarehouseId": 1 }'
Media typeapplication/json
object
warehouseId
required
number | string
integrationId
required
number
sourceWarehouseId
required
number | string

Example generated

{
"warehouseId": 1,
"integrationId": 1,
"sourceWarehouseId": 1
}

Successful response

Media typeapplication/json
WarehouseWriteResult
object
result
required
WarehouseDetails
One of: discriminator: integrationType
ComarchOptimaWarehouseDetails
object
id
required
number
code
required
string
name
required
string
description
required
string | null
customFields
required
object
key
additional properties
CustomFieldValue
One of:
object
type
required
string
Allowed value: text
value
required
string
integrationId
required
number
integrationType
required
string
Allowed value: comarch-optima
active
required
boolean
type
required
number
meta
object
scope
string
Allowed values: code name
confidence
number
<= 1
warnings
required
Array<object>
WriteWarning
object
stage
required
string
Allowed values: placements documents tags participants images assetExtras
detail
required
string

Example

{
"result": {
"customFields": {},
"integrationType": "comarch-optima",
"meta": {
"scope": "code"
}
},
"warnings": [
{
"stage": "placements"
}
]
}

Bad request

Media typeapplication/json
error.BAD_REQUEST

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "BAD_REQUEST",
"message": "Bad request",
"issues": []
}

Unauthorized

Media typeapplication/json
error.UNAUTHORIZED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"issues": []
}

Payment required

Media typeapplication/json
error.PAYMENT_REQUIRED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "PAYMENT_REQUIRED",
"message": "Payment required",
"issues": []
}

Forbidden

Media typeapplication/json
error.FORBIDDEN

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "FORBIDDEN",
"message": "Forbidden",
"issues": []
}

Not found

Media typeapplication/json
error.NOT_FOUND

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}

Conflict

Media typeapplication/json
error.CONFLICT

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "CONFLICT",
"message": "Conflict",
"issues": []
}

Unprocessable content

Media typeapplication/json
error.UNPROCESSABLE_CONTENT

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNPROCESSABLE_CONTENT",
"message": "Unprocessable content",
"issues": []
}

Too many requests

Media typeapplication/json
error.TOO_MANY_REQUESTS

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests",
"issues": []
}

Internal server error

Media typeapplication/json
error.INTERNAL_SERVER_ERROR

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}

Service unavailable

Media typeapplication/json
error.SERVICE_UNAVAILABLE

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "SERVICE_UNAVAILABLE",
"message": "Service unavailable",
"issues": []
}