Register credit memo
Register the credit memo issued for a return and complete it. Requires creditmemo_number; validates items[] and shipping_amount_incl_tax against the return. doc_binary, when sent, must be a base64-encoded PDF. Idempotent: re-sending the same credit memo number returns the completed return without re-processing.
Request Body
Section titled “Request Body ”object
Credit memo registered for a return. The items and the shipping amount are checked against the return; the credit memo itself always mirrors the return as stored.
object
The return number (e.g. R000000123); the return entity ID is accepted as well.
Every item of the return with its returned qty, no more and no less.
Return item confirmed by the credit memo. Used for validation only: the credit memo is always registered for the items and quantities stored on the return.
object
The return item ID (items[].id of the return).
The qty; must equal the qty of the return item.
The returned shipping of the original order incl. tax: return_shipping_amount of the return.
The credit memo number; unique across returns.
The credit memo time, format yyyy-mm-ddThh:mm:ss+hh:mm.
Additional credit memo data as a JSON encoded string.
The credit memo document, base64 encoded PDF.
Example generated
{ "creditmemo": { "return_id": "example", "items": [ { "item_id": 1, "qty": 1 } ], "shipping_amount_incl_tax": 1, "creditmemo_number": "example", "creditmemo_time": "example", "additional_data": "example", "doc_binary": "example" }}object
Credit memo registered for a return. The items and the shipping amount are checked against the return; the credit memo itself always mirrors the return as stored.
object
The return number (e.g. R000000123); the return entity ID is accepted as well.
Every item of the return with its returned qty, no more and no less.
Return item confirmed by the credit memo. Used for validation only: the credit memo is always registered for the items and quantities stored on the return.
object
The return item ID (items[].id of the return).
The qty; must equal the qty of the return item.
The returned shipping of the original order incl. tax: return_shipping_amount of the return.
The credit memo number; unique across returns.
The credit memo time, format yyyy-mm-ddThh:mm:ss+hh:mm.
Additional credit memo data as a JSON encoded string.
The credit memo document, base64 encoded PDF.
Responses
Section titled “ Responses ”200 Success.
object
Order number (increment id).
The sales channel order number.
Name as entered on the return document.
The settlement direction from the sign of settlement_total: refund (> 0), charge (< 0) or none (0).
The original order shipping refunded with the return; 0 when the return does not include it.
The total of the returned side: returned items plus return_shipping_amount, incl. tax.
The shipping charged on the replacement, incl. tax; 0 when none is charged.
The total of the replacement: replacement items plus replacement_shipping_amount, incl. tax.
The signed balance: return_grand_total - replacement_grand_total; negative when the customer pays.
The credit memo number; absent until the credit memo is registered.
The credit memo time; absent until registered, or when the credit memo was sent without one.
The time the return was completed; absent while it is not complete.
object
Example generated
{ "id": 1, "return_number": "example", "fulfillment_order_id": 1, "fulfillment_order_number": "example", "order_number": "example", "sales_order_number": "example", "channel_code": "example", "warehouse_code": "example", "customer_firstname": "example", "customer_lastname": "example", "customer_email": "example", "customer_name": "example", "status": "example", "settlement_type": "example", "return_reason": "example", "total_qty": 1, "return_shipping_amount": 1, "return_grand_total": 1, "replacement_order_id": 1, "replacement_order_number": "example", "replacement_shipping_amount": 1, "replacement_grand_total": 1, "settlement_total": 1, "creditmemo_number": "example", "creditmemo_time": "example", "completed_at": "example", "created_at": "example", "updated_at": "example", "items": [ { "id": 1, "fulfillment_order_item_id": 1, "order_item_id": 1, "sku": "example", "erp_sku": "example", "name": "example", "qty": 1, "price": 1, "row_total": 1, "description": "example" } ]}object
Order number (increment id).
The sales channel order number.
Name as entered on the return document.
The settlement direction from the sign of settlement_total: refund (> 0), charge (< 0) or none (0).
The original order shipping refunded with the return; 0 when the return does not include it.
The total of the returned side: returned items plus return_shipping_amount, incl. tax.
The shipping charged on the replacement, incl. tax; 0 when none is charged.
The total of the replacement: replacement items plus replacement_shipping_amount, incl. tax.
The signed balance: return_grand_total - replacement_grand_total; negative when the customer pays.
The credit memo number; absent until the credit memo is registered.
The credit memo time; absent until registered, or when the credit memo was sent without one.
The time the return was completed; absent while it is not complete.
object
400 Bad Request
object
Error message
Errors list
Error details
object
Error message
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Error code
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Stack trace
Example generated
{ "message": "example", "errors": [ { "message": "example", "parameters": [ { "resources": "example", "fieldName": "example", "fieldValue": "example" } ] } ], "code": 1, "parameters": [ { "resources": "example", "fieldName": "example", "fieldValue": "example" } ], "trace": "example"}object
Error message
Errors list
Error details
object
Error message
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Error code
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Stack trace
401 Unauthorized
object
Error message
Errors list
Error details
object
Error message
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Error code
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Stack trace
Example generated
{ "message": "example", "errors": [ { "message": "example", "parameters": [ { "resources": "example", "fieldName": "example", "fieldValue": "example" } ] } ], "code": 1, "parameters": [ { "resources": "example", "fieldName": "example", "fieldValue": "example" } ], "trace": "example"}object
Error message
Errors list
Error details
object
Error message
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Error code
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Stack trace
Internal Server error
object
Error message
Errors list
Error details
object
Error message
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Error code
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Stack trace
Example generated
{ "message": "example", "errors": [ { "message": "example", "parameters": [ { "resources": "example", "fieldName": "example", "fieldValue": "example" } ] } ], "code": 1, "parameters": [ { "resources": "example", "fieldName": "example", "fieldValue": "example" } ], "trace": "example"}object
Error message
Errors list
Error details
object
Error message
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Error code
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Stack trace
default
Section titled “default ”Unexpected error
object
Error message
Errors list
Error details
object
Error message
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Error code
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Stack trace
Example generated
{ "message": "example", "errors": [ { "message": "example", "parameters": [ { "resources": "example", "fieldName": "example", "fieldValue": "example" } ] } ], "code": 1, "parameters": [ { "resources": "example", "fieldName": "example", "fieldValue": "example" } ], "trace": "example"}object
Error message
Errors list
Error details
object
Error message
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Error code
Error parameters list
Error parameters item
object
ACL resource
Missing or invalid field name
Incorrect field value
Stack trace