Przejdź do głównej zawartości

Update a goods transfer note

POST
/goodsTransferNotes.update
curl --request POST \
--url https://api.sancho-wms.pl/v1/goodsTransferNotes.update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "id": 1, "integrationId": 1, "values": { "sourceWarehouse": { "id": 1, "code": "example", "name": "example" }, "destinationWarehouse": { "id": 1, "code": "example", "name": "example" }, "issueDate": "example", "operator": { "id": 1, "name": "example" }, "category": { "id": 1, "code": "example", "name": "example", "parentCode": "example", "active": true }, "documentSymbol": "MM", "manualNumber": 1, "note": "example", "items": [ { "lineId": null, "productId": 1, "productCode": "example", "productName": "example", "quantity": 1, "unit": "example", "priceNet": null, "pricePrecision": 2, "quantityPrecision": 4, "valueNet": null, "fromLocation": null, "toLocation": null } ], "relatedDocuments": [] }, "tags": [ { "lineIndex": 1, "identifiers": [ { "id": "example", "note": "example", "tags": [ { "id": 1, "code": "example", "note": "example", "type": "qr", "productId": 1, "productKey": "example", "productName": "example" } ] } ] } ], "status": "draft", "expectedSavedAt": "example", "expectedModifiedAt": "example" }'

A key with goodsTransferNote:annotate but not goodsTransferNote:update writes nothing to the ERP: the document stays as it stands and a draft stays a draft, while the tags, storage locations and links Sancho keeps beside it are saved. The integration must grant goodsTransferNote:update for every save.

Media typeapplication/json
object
id
required
number | string
integrationId
required
number
values
required
GoodsTransferNoteValidValues
object
sourceWarehouse
required
object
id
required
number | string
code
required
string | null
name
required
string
destinationWarehouse
required
object
id
required
number | string
code
required
string | null
name
required
string
issueDate
required
string
operator
required
Any of:
OperatorValue
object
id
required
number
name
required
string
category
required
Any of:
object
id
required
number | string
code
required
string
name
required
string | null
parentCode
required
string | null
active
required
boolean
documentSymbol
string
default: MM
manualNumber
required
number | null
note
required
string
items
required
Array<object>
object
lineId
number | string | null
productId
required
number | string
productCode
required
string | null
productName
required
string | null
quantity
required
number
unit
required
string | null
priceNet
number | null
pricePrecision
integer
default: 2 >= 2 <= 4
quantityPrecision
integer
default: 4 <= 4
valueNet
number | null
fromLocation
Any of:
object
id
required
number
name
required
string
chainLabel
required
string | null
description
required
string | null
type
required
string
Allowed values: zone aisle rack shelf bin staging dock
toLocation
Any of:
object
id
required
number
name
required
string
chainLabel
required
string | null
description
required
string | null
type
required
string
Allowed values: zone aisle rack shelf bin staging dock
relatedDocuments
Array<object>
default:
RelatedDocument
One of: discriminator: integrationType
IntegrationRelatedDocument
One of: discriminator: integrationType
object
label
required
string | null
linkId
number | null
integrationType
required
string
Allowed values: comarch-optima erp-next fakturownia comarch-bmp custom
integrationId
required
number
id
required
number | string
type
required
string
Allowed value: goodsReceivedNote
kind
required
string
Allowed values: external internal
tags
required
Array<object>
NoteLineTags
object
lineIndex
required
integer
<= 9007199254740991
identifiers
required
Array<object>
object
id
required
string
note
required
string
tags
required
Array<object>
object
id
required
number | null
code
required
string
note
required
string
type
required
string
Allowed values: qr nfc
productId
required
number | null
productKey
required
string | null
productName
required
string | null
status
required
string
Allowed values: draft committed
expectedSavedAt
required
string | null
expectedModifiedAt
required
string | null

Successful response

Media typeapplication/json
GoodsTransferNoteWriteResult
object
result
required
GoodsTransferNoteDetails
One of: discriminator: integrationType
ComarchOptimaGoodsTransferNoteDetails
object
id
required
number | string
type
required
string
Allowed value: transfer
kind
required
string
Allowed values: transfer
documentNumber
required
string | null
externalNumber
required
string | null
documentDate
required
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
operationDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
sourceWarehouse
required
Any of:
object
id
required
number | string | null
code
required
string | null
name
required
string | null
destinationWarehouse
required
Any of:
object
id
required
number | string | null
code
required
string | null
name
required
string | null
status
required
string
Allowed values: draft committed cancelled
documentSymbol
required
string | null
note
required
string | null
currency
required
string | null
totalNet
required
number | null
items
required
Array<object>
object
lineId
required
number | null
productId
required
number | string | null
productCode
required
string | null
productName
required
string | null
quantity
required
number | null
unit
required
string | null
priceNet
required
number | null
pricePrecision
required
integer
default: 2 >= 2 <= 4
quantityPrecision
required
integer
default: 4 <= 4
valueNet
required
number | null
customFields
required
CustomFields
object
key
additional properties
CustomFieldValue
One of:
object
type
required
string
Allowed value: text
value
required
string
customFieldsMeta
required
CustomFieldsMeta
object
key
additional properties
object
savedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
user
required
object
id
required
number
name
required
string
avatar
required
string | null
relatedDocuments
required
Array<object>
default:
RelatedDocumentOutput
One of: discriminator: integrationType
IntegrationRelatedDocumentOutput
One of: discriminator: integrationType
object
label
required
string | null
linkId
required
number | null
integrationType
required
string
Allowed values: comarch-optima erp-next fakturownia comarch-bmp custom
integrationId
required
number
id
required
number | string
type
required
string
Allowed value: goodsReceivedNote
kind
required
string
Allowed values: external internal
snapshotSavedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
placementsAppliedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
modifiedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
modifiedBy
required
string | null
tags
required
Any of:
Array<object>
NoteLineTagsOutput
object
lineIndex
required
integer
<= 9007199254740991
identifiers
required
Array<object>
object
id
required
string
note
required
string
tags
required
Array<object>
object
id
required
number | null
code
required
string
note
required
string
type
required
string
Allowed values: qr nfc
productId
required
number | null
productKey
required
string | null
productName
required
string | null
integrationId
required
number
integrationType
required
string
Allowed value: comarch-optima
warnings
required
Array<object>
WriteWarning
object
stage
required
string
Allowed values: placements documents tags participants images assetExtras
detail
required
string

Example

{
"result": {
"type": "transfer",
"kind": "transfer",
"status": "draft",
"currency": null,
"totalNet": null,
"items": [
{
"lineId": null,
"pricePrecision": 2,
"quantityPrecision": 4
}
],
"customFields": {},
"customFieldsMeta": {},
"relatedDocuments": [],
"placementsAppliedAt": null,
"modifiedAt": null,
"modifiedBy": null,
"tags": null,
"integrationType": "comarch-optima"
},
"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": []
}