1. 3. Returns
Yamm
  • Partner API
    • 1. Authentication
      • Issue Access Token
    • 2. Catalog
      • List Products
      • Get Product
    • 3. Returns
      • List Return Reasons
        GET
      • Create Return Reason
        POST
      • Upload Return Attachment
        POST
      • Create Return
        POST
      • List Returns
        GET
      • Get Return
        GET
      • Approve Return
        POST
      • Reject Return
        POST
      • List Resolution Methods
        GET
      • Inspect Return
        POST
      • Cancel Return
        POST
      • Get Return Timeline
        GET
    • 4. Webhooks
      • Webhook Meta
      • List Webhooks
      • Create Webhook
      • Get Webhook
      • Update Webhook
      • Delete Webhook
      • Rotate Webhook Secret
      • Send Test Webhook
      • List Webhook Deliveries
      • Get Webhook Delivery
      • Retry Webhook Delivery
    • 5. Store & Orders
      • Get Store
      • List Orders
      • Get Order
  1. 3. Returns

Create Return Reason

POST
/partner/v1/return-reasons
Adds a return reason for the store. It is active and enabled right away, so it shows in List Return Reasons and can be used as products[].reason_id on returns of the given types. return_types defaults to all types; include return to use it on POS returns.
Scope: refunds:write.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢201Created
application/json
Bodyapplication/json

🟠400Invalid return types
🟠422Validation failed
🟠401Unauthorized
🟠403Forbidden
🟠429Too Many Requests
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/partner/v1/return-reasons' \
--header 'X-Store-Id: {{partner_store_id}}' \
--header 'Accept-Language: en' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "name": {
        "en": "Changed my mind",
        "ar": "غيرت رأيي"
    },
    "return_types": [
        "return",
        "exchange"
    ]
}'
Response Response Example
201 - Example 1
{
    "success": true,
    "message": "string",
    "data": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": {
            "en": "string",
            "ar": "string"
        },
        "return_types": [
            "return"
        ]
    }
}
Previous
List Return Reasons
Next
Upload Return Attachment
Built with