Skip to main content

Create Promotion Codes

POST 

https://useast.api.elasticpath.com/v2/promotions/:promotionID/codes

Use this endpoint to create promotion codes for a specific promotion.

note

When a promotion expires, the promotion codes attached to the promotion automatically become invalid. However, when you re-enable the expired promotion, the promotion codes attached to the promotion are deleted.

Request

Responses

Response Headers

    Authorization: http

    name: bearerAuthtype: httpscheme: bearer

    Request Collapse all
    Base URL
    https://useast.api.elasticpath.com
    Auth
    Parameters
    — pathrequired
    — headerrequired
    Body
    {
      "codes": [
        {
          "code": "string",
          "consume_unit": "string",
          "user": "string",
          "uses": 0
        }
      ],
      "type": "string"
    }
    
    ResponseClear

    Click the Send API Request button above and see the response here!

    We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.