Prolifto
API reference

Coupons

Discount codes

Get Many

GET
/{organizationSlug}/coupons

Path Parameters

organizationSlug*string
Length1 <= length

Query Parameters

deletedOnly?boolean
Defaultfalse
limit?number
Default10
Range1 <= value <= 100
orderBy?array<>
Default["created_desc"]
page?number
Default1
Range1 <= value
search?|
status?string
Value in"ACTIVE" | "INACTIVE" | "SCHEDULED" | "EXPIRED"

Response Body

application/json

curl -X GET "https://www.prolifto.store/api/string/coupons"
{}

Create

POST
/{organizationSlug}/coupons

Path Parameters

organizationSlug*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://www.prolifto.store/api/string/coupons" \  -H "Content-Type: application/json" \  -d '{    "code": "string",    "discountType": "PERCENTAGE",    "discountValue": 0,    "expiresAt": "2019-08-24T14:15:22Z"  }'
{}

Delete Many

DELETE
/{organizationSlug}/coupons

Path Parameters

organizationSlug*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X DELETE "https://www.prolifto.store/api/string/coupons" \  -H "Content-Type: application/json" \  -d '{    "couponIds": [      "string"    ]  }'
{}

Get One

GET
/{organizationSlug}/coupons/{couponId}

Path Parameters

organizationSlug*string
Length1 <= length
couponId*string
Length1 <= length

Response Body

application/json

curl -X GET "https://www.prolifto.store/api/string/coupons/string"
{}

Update

PATCH
/{organizationSlug}/coupons/{couponId}

Path Parameters

organizationSlug*string
Length1 <= length
couponId*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://www.prolifto.store/api/string/coupons/string" \  -H "Content-Type: application/json" \  -d '{    "code": "string",    "discountType": "PERCENTAGE",    "discountValue": 0,    "expiresAt": "2019-08-24T14:15:22Z"  }'
{}

Delete

DELETE
/{organizationSlug}/coupons/{couponId}

Path Parameters

organizationSlug*string
Length1 <= length
couponId*string
Length1 <= length

Response Body

application/json

curl -X DELETE "https://www.prolifto.store/api/string/coupons/string"
{}

Get Usages

GET
/{organizationSlug}/coupons/{couponId}/usages

Path Parameters

organizationSlug*string
Length1 <= length
couponId*string
Length1 <= length

Response Body

application/json

curl -X GET "https://www.prolifto.store/api/string/coupons/string/usages"
{}

Set Active Many

POST
/{organizationSlug}/coupons/set-active

Path Parameters

organizationSlug*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://www.prolifto.store/api/string/coupons/set-active" \  -H "Content-Type: application/json" \  -d '{    "couponIds": [      "string"    ],    "isActive": true  }'
{}

Validate

POST
/{organizationSlug}/coupons/validate

Path Parameters

organizationSlug*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://www.prolifto.store/api/string/coupons/validate" \  -H "Content-Type: application/json" \  -d '{    "couponCode": "string",    "variants": [      {        "variantId": "string"      }    ]  }'
{}