Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Get Promo Code Lists

Method Objective

The method allows getting all existing lists of promo codes.

Request

EndpointRequest Type
https://api.personaclick.com/promo_codesGET

Parameters

Name

TypeRequirement

Description

shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
shop_secretstringrequiredStore Secret Key in PersonaClick. Located there: Account > Settings > Store Settings

API Response Code

HTTP status code

Description
200 OK

The request was successful.

403 ForbiddenThe request was unsuccessful.
404 Not FoundThere are no mandatory parameters in the request.

API Response Data

The API returns an array of category objects. Below are the properties of a single object.

NameTypeDescription
idnumber

The ID of the Promo Code list

namestring

The name of the Promo Code list

availablenumberAvailable number of promo codes.

Request Example

Code Block
languagejsbash
themeFadeToGrey
curl 'https://api.personaclick.com/promo_codes?shop_id=0d42fd8b713d0752776ca589cc0056&shop_secret=0123456789abcdef0123456789abcdef'


Upload Promo Codes

Method Objective

The method allows uploading promo codes to the specified list.

Request

EndpointRequest TypeContent-Type
https://api.personaclick.com/promo_codesPOSTapplication/json

Parameters

Name

TypeRequirement

Description

shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
shop_secretstringrequiredStore Secret Key in PersonaClick. Located there: Account > Settings > Store Settings
idstringrequiredPromo code list ID
codesArrayrequiredThe array of promo codes.

API Response Code

HTTP status code

Description
200 OK

The request was successful.

400 Bad RequestSee the "message" property of the API response for details.
403 ForbiddenSee the "message" property of the API response for details.
404 Not FoundRequired query parameters are missed or undefined.

API Response Data

The response is JSON type with the following properties:

NameTypeDescription
statusstring

Current status. Can have one of two values:

  • success - the request was successful
  • error - the request was unsuccessful
messagestring

The text of the error if it occurred

Example of use

Code Block
languagejsbash
themeFadeToGrey
curl 'https://api.personaclick.com/promo_codes' \
  -X 'POST' \
  -H 'content-type: application/json' \
  -d '{"shop_id":"0d42fd8b713d0752776ca589cc0056","shop_secret":"0123456789abcdef0123456789abcdef","id":100500,"codes":["code1","code2","codeN"]}'


Get Next Promo Code

Method Objective

The method gives the next promo code from the requested list of promo codes.

Request

EndpointRequest Type
https://api.personaclick.com/promo_codes/fetchGET

Parameters

NameTypeRequirementDescription
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
idnumberrequiredPromo code list ID.

API Response Code

HTTP status code

Description
200 OK

The request was successful.

403 ForbiddenThe request was unsuccessful.
404 Not FoundThere are no mandatory parameters in the request.

API Response Data

NameTypeDescription
codestring

The next promo code on the list.

Request Example

Code Block
languagejsbash
themeFadeToGrey
curl 'https://api.personaclick.com/promo_codes/fetch?shop_id=0d42fd8b713d0752776ca589cc0056&id=100500'



Column

Page Navigation

Table of Contents
maxLevel1

classpersonaclick-fixed-position

indent0px
stylenone




Related Pages

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
cqllabel = "promocodes"