DEVELOPER API: /customers/pincodes

Last updated at

This resource is used to create and get the status of existing callback pincodes. 

GET

Mandatory parameters

None.

Optional parameters

Name

Type

Description

pincode_id

int

ID of a pincode

customer_id

int

Freespee’s unique ID for a customer

page

int

Pagination, pincodes are returned in chunks of 1000, most recent first

Output

Name Description
pincodes

Name

Type

Description

id

int

ID of the pincode

pincode

string

The pincode to be used – only available if it hasn’t expired

phone_number

string

Where the caller will be connected after entering the pincode, in e164 format. 

pincode_expires

string

Date after when the pincode will be removed

outcome

string

If there has been call attempts it will return failed, attempted or successful. If none, it will show “no attempts”.

calls (if a pincode_id was provided)

Name

Type

Description

id

int

ID of the attempt

timestamp

string

Time of the attempted callback

duration

int

duration of the call (after connecting to the prospect)

 outcome*  string If there has been call attempts it will return failed, attempted or successful. If none, it will show “no attempts”.

 

* outcome is only available if you’re using the pincodes API in combination with the Callback Manager workflow, otherwise the outcome will be null


POST
 

Mandatory parameters

Name

Type

Description

pincode_length

int

How many digits should be used for the pincode (6,7 or 8)

pincode_ttl

int

How long should the pincode be available for use (1-14 days)

customer_id

int

Freespee’s unique ID for a customer

phone_number

string

Number that the pincode should connect the call to (in e164 format). Freespee will validate the number before returning a PIN.

OR

Name

Type

Description

pincode_length

int

How many digits should be used for the pincode (6,7 or 8)

pincode_ttl

int

How long should the pincode be available for use (1-14 days)

cdr_id

int

Freespee’s unique ID for a call

 

OUTPUT

Name

Type

Description

id

int

id of the pincode

pincode

string

pincode to use

pincode_numbers

string

phone numbers that can be called to enter the pincode

 

DELETE

Name

Type

Description

pincode_id

int

ID of a pincode

 

This request will mask the consumers phone number in the database, as well as invalidate the PIN code.