Rebrand 2023 Learn more 

  • Promotions/
    Promotion Codes/
    Jobs API/
    Get Promotion Jobs

    Get Promotion Jobs

    GET GET Promotion Jobs

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

    Parameters

    Path parameters

    NameRequiredTypeDescription
    promotionIDRequiredstringThe unique identifier of a promotion.

    Query parameters

    NameRequiredTypeDescription
    filterOptionalstringSpecifies the filter attributes. See Filtering.

    Headers

    NameRequiredTypeDescription
    AuthorizationRequiredstringThe Bearer token required to get access to the API.

    Filtering

    The following operators and attributes are available when filtering on this endpoint.

    AttributeTypeOperatorExample
    job_typestringeqeq(job_type, code_export)
    statusstringeqeq(status, complete)

    Request Example - Curl

    curl -X GET https://useast.api.elasticpath.com/v2/promotions/:promotionID/jobs \
         -H "Authorization: Bearer XXXX"
    

    Response Example

    200 OK

    {
        "data": [
            {
                "type": "promotion_job",
                "id": "e7dfe48f-0dc0-49d4-a8d4-66920230d940",
                "promotion_id": "19c08913-cc8c-47d8-a211-450c9e945970",
                "job_type": "code_generate",
                "name": "bulk gen",
                "parameters": {
                    "number_of_codes": 2,
                    "consume_unit": "per_cart"
                },
                "status": "pending",
                "meta": {
                    "timestamps": {
                        "created_at": "2023-08-01T21:53:46.448Z",
                        "updated_at": "2023-08-01T21:53:46.448Z"
                    }
                }
            },
    
        ]
    }
    

    Was this helpful?

    Previous
    Delete Promotion Codes