Zoey REST API reference ยท Interactive version: apidocs.zoey.com

Orders

Orders: Credit Memos (Deprecated)

Comments

Add

POST https://container-url.zoeysite.com/api/rest/sales2/orders/creditmemo/comment

Param Type Notes Required
creditMemoIncrementId string The increment id of the Credit Memo. Yes
comment string The comment being added to the Credit Memo. Yes
email boolean Notify the customer of the comment being added. No (default: false)
includeInEmail boolean Include the comment in the notification email. No (default: false)

Example request body:

{
    "creditMemoIncrementId": "100000006",
    "comment": "This is my test comment.",
    "email": true,
    "includeInEmail": true
}

Create

POST https://container-url.zoeysite.com/api/rest/sales2/orders/creditmemo

Param Notes
orderIncrementId The increment ID of the order to create the credit memo for.
itemsQty Object key is itemId and the value is qty. (ex. [{ "311": "2", "312" : "1" }] Would credit 2 of order item 311 and 1 of order item 312) The Order Item ID that is used will always be the Parent ID in the event of a Configurable/Grouped/Bundled product. If an empty JSON object is posted then it will process ALL remaining items.
comment Message to send to create on credit memo for customer to see. (Optional)
email Flag to send credit memo email to customer on creation. Use value 1 to send
includeComment Flag to include comment on the email, if sent. Use value 1 to include.

Example request body:

{
    "orderIncrementId": "100000180",
    "creditmemoData": {
        "qtys": {
            "311": "2"
        },
        "shipping_amount": "5.00",
        "adjustment_positive": "0",
        "adjustment_negative": "0"
    },
    "comment": "Created By API",
    "notifyCustomer": "1",
    "includeComment": "1"
}

Example response (Create), HTTP 200:

"100000019"

Get All

GET https://container-url.zoeysite.com/api/rest/sales2/orders/creditmemos?include_comments=1

Query parameters:

NameExampleNotes
limit2Limit the amount of results returned. (Optional)
page1Paginate the limit. (Optional)
order[increment_id]DESCUsed to sort by property key / direction. (Optional)
filters[increment_id][gt]100000003Used to filter results by property. (Optional)
filters[grand_total][gt]400Qty Filtering Example
include_comments1Include comments in the response. (Boolean Flag 1 or 0. Optional)