CardExchange Cloud - API Reference


Introduction

The CardExchange Cloud API is organized around REST. The API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses,  and uses standard HTTP response codes, authentication, and verbs.

You can use the CardExchange Cloud API in test mode, which does not affect your live data. The API key you use to authenticate the request determines whether the request is live mode or test mode.

Authentication

The CardExchange Cloud API uses API keys to authenticate requests. You can view your API keys on the profile page of the CardExchange Cloud Auth website.

Test mode secret keys have the prefix sk_test_ and live mode secret keys have the prefix sk_live_.

Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.

If you need to authenticate via bearer auth (e.g., for a cross-origin request), use the Bearer auth header instead.

Errors

CardExchange Cloud uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, an invalid value was supplied, etc.). Codes in the 5xx range indicate an error with the CardExchange Cloud server.

Attributes

titlestringA short, human-readable summary of the problem type.
statusintegerThe HTTP status code generated by the server for this occurrence of the problem.
detailstringA human-readable explanation specific to this occurrence of the problem.
errorsobjectSet of key-value pairs providing more details about the error. If the error is parameter-specific, the key will contain the parameter related to the error. Otherwise, the key will be an empty string.

Addresses

Address objects contain information about a person's physical mailing address.

The address object

Attributes

idstring(guid)Unique identifier for the object.
personstring(guid)ID of the person who the address belongs to.
typestringAddress type. One of: home, business, or po_box.
streetAddressstringFull street address component, which may include house number, street name, Post Office Box, and multi-line extended street address information.
localitystringCity or locality component.
regionstringState, province, prefecture, or region component.
postalCodestringZip code or postal code component.
countrystringCountry name component.
metadataobjectSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
createdstring(date-time)Time at which the object was created.

Create an address

Creates a new address object.

Action URL

POST /api/v1/addresses

Arguments

personrequiredThe identifier of the person to add the address to.
typerequiredThe address' type. One of: home, business, or po_box.
streetAddressrequiredFull street address component, which may include house number, street name, Post Office Box, and multi-line extended street address information.
localityrequiredCity or locality component.
regionrequiredState, province, prefecture, or region component.
postalCoderequiredZip code or postal code component.
countryrequiredCountry name component.
metadataoptionalA set of key-value pairs that you can attach to an address object. It can be useful for storing additional information about the address in a structured format.

Returns

Returns an address object if the call succeeded.

Retrieve an address

Retrieves the details of an existing address.

Action URL

GET /api/v1/addresses/:id

Arguments

id (path)requiredThe identifier of the address to be retrieved.

Returns

Returns an address object if a valid identifier was provided.

Update an address

Updates the specified address.

Action URL

POST /api/v1/addresses/:id

Arguments

id (path)requiredThe identifier of the address to update.
personoptionalThe identifier of the new person for this address.
typeoptionalThe address' type. One of: home, business, or po_box.
streetAddressoptionalFull street address component, which may include house number, street name, Post Office Box, and multi-line extended street address information.
localityoptionalCity or locality component.
regionoptionalState, province, prefecture, or region component.
postalCodeoptionalZip code or postal code component.
countryoptionalCountry name component.
metadataoptionalA set of key-value pairs that you can attach to an address object. It can be useful for storing additional information about the address in a structured format.

Returns

Returns the address object if the update succeeded. Returns an error if update parameters are invalid (e.g. specifying an invalid type or an invalid person).

Delete an address

Permanently deletes an address. It cannot be undone.

Action URL

DELETE /api/v1/addresses/:id

Arguments

id (path)requiredThe identifier of the address to be deleted.

Returns

Returns an empty response on success. If the address ID does not exist, this call returns an error.

List all addresses

Returns a list of addresses.

Action URL

GET /api/v1/addresses

Arguments

q (query)

optionalOnly return addresses that mention the given search term.

person (query)

optionalThe ID of the person whose addresses will be retrieved.
type (query)optionalOnly return addresses of the given type. One of: home, business, or po_box.
page (query)optionalA cursor for use in pagination that defines your place in the list based on the number of objects to be returned. The default is 1.
per_page (query)optionalA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 15.

Returns

A list of up to per_page addresses, starting at page. Passing the optional search query will result in filtering to only addresses that mention the supplied value. Passing any of the optional filters will result in filtering to addresses with only those exact values. Each entry in the list is a separate address object. If no more addresses are available, the resulting list will be empty. The response will contain two extra headers, Link and X-Total-Count, which provide convenience URLs to the first, last, next, and/or previous pages, and the total number of objects based on the supplied search criteria.

Anonymous sets

Anonymous set objects represent a set of cardholders and cards that are not linked to a real person. The associated anonymous cardholders can be linked to real persons as visitors or temporary cardholders.

The anonymous set object

Attributes

idstring(guid)Unique identifier for the object.
profilestring(guid)ID of the cardholder profile associated with the anonymous set.
defaultNamestringName of the set.
datalist, contains: person objectAnonymous cardholders and cards contained in the set.

Create an anonymous set

Creates a new set of anonymous cardholders and cards.

Action URL

POST /api/v1/anonymous-sets

Arguments

profilerequiredThe identifier of the profile to use for the cardholders.
defaultNamerequiredThe name of the set.
quantityrequiredThe number of cards to include in the set.
businessUnitoptionalThe business unit to use for the cardholders.
externalCompanyoptionalThe external company to use for the cardholders.
departmentoptionalThe department to use for the cardholders.
jobTitleoptionalThe job title to use for the cardholders.
locationoptionalThe location to use for the cardholders.
costAccountoptionalThe cost account to use for the cardholders.
noteoptionalThe note to use for the cardholders.

Returns

Returns an anonymous set object if the call succeeded.

Retrieve an anonymous set

Retrieves the details of an existing anonymous set.

Action URL

GET /api/v1/anonymous-sets/:id

Arguments

id (path)requiredThe identifier of the anonymous set to be retrieved.

Returns

Returns an anonymous set object if a valid identifier was provided.

Update an anonymous set

Adds additional cards to the specified anonymous set.

Action URL

POST /api/v1/anonymous-sets/:id

Arguments

id (path)requiredThe identifier of the anonymous set to update.
quantityrequiredThe number of cards to add to the set.
businessUnitoptionalThe business unit to use for the cardholders.
externalCompanyoptionalThe external company to use for the cardholders.
departmentoptionalThe department to use for the cardholders.
jobTitleoptionalThe job title to use for the cardholders.
locationoptionalThe location to use for the cardholders.
costAccountoptionalThe cost account to use for the cardholders.
noteoptionalThe note to use for the cardholders.

Returns

Returns the anonymous set object if the update succeeded. Returns an error if update parameters are invalid (e.g. specifying a quantity less than 1 or an invalid department).

Delete an anonymous set

Since cards cannot be deleted, anonymous sets cannot be deleted either.

List all anonymous sets

Returns a list of anonymous sets.

Action URL

GET /api/v1/anonymous-sets

Arguments

q (query)optionalOnly return sets that mention the given search term.
profile (query)optionalOnly return sets for the given profile ID.
business_unit (query)optionalOnly return sets for the given business unit ID.
external_company (query)optionalOnly return sets for the given external company ID.
department (query)optionalOnly return sets for the given department ID.
location (query)optionalOnly return sets for the given location ID.
cost_account (query)optionalOnly return sets for the given cost account ID.
page (query)optionalA cursor for use in pagination that defines your place in the list based on the number of objects to be returned. The default is 1.
per_page (query)optionalA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 15.

Returns

A list of up to per_page anonymous sets, starting at page. Passing the optional search query will result in filtering to only sets that mention the supplied value. Passing any of the optional filters will result in filtering to sets with only those exact values. Each entry in the list is a separate anonymous set object. If no more sets are available, the resulting list will be empty. The response will contain two extra headers, Link and X-Total-Count, which provide convenience URLs to the first, last, next, and/or previous pages, and the total number of objects based on the supplied search criteria.

Cardholders

Cardholder objects contain information about a person's profile and contain the cards that belong to the profile.

The cardholder object

Attributes

idstring(guid)Unique identifier for the object.
personstring(guid)ID of the person who the cardholder belongs to.
profileobjectObject describing the cardholder's profile.
profileNumberstringUnique, displayable identifier for the cardholder.
loginIdstringUsername for the profile.
emailstringEmail for the profile.
businessUnitobjectObject describing the cardholder's business unit.
externalCompanyobjectObject describing the cardholder's external company.
departmentobjectObject describing the cardholder's department.
costAccountobjectObject describing the cardholder's cost account.
locationobjectObject describing the cardholder's location.
startDatestring(date-time)Start date of the cardholder.
endDatestring(date-time)End date of the cardholder.
statusstringStatus of the cardholder. One of: activated, blocked, expired, blacklisted, linked, or unlinked.
nameOnCardstringName that will be displayed on the cards for the cardholder.
notestringAdditional notes for the cardholder.
metadataobjectSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
createdstring(date-time)Time at which the object was created.
cardslist, contains: card objectList of cards belonging to the cardholder.

Create a cardholder

Creates a new cardholder object.

Action URL

POST /api/v1/cardholders

Arguments

personoptionalThe identifier of the person who the cardholder will belong to.
profilerequiredThe identifier of the profile for the cardholder.
loginIdoptionalThe username to use for the profile.
passwordoptionalThe password to use for the profile.
emailoptionalThe email to use for the profile.
businessUnitoptionalThe identifier of the business unit to associate with the cardholder.
externalCompanyoptionalThe identifier of the external company to associate with the cardholder.
departmentoptionalThe identifier of the department to associate with the cardholder.
startDateoptionalThe date that the cardholder should become active from.
endDateoptionalThe date that the cardholder should remain active until.
statusoptionalThe status of the cardholder. One of: activated, blocked, expired, blacklisted, linked, or unlinked.
locationoptionalThe identifier of the location to associate with the cardholder.
costAccountoptionalThe identifier of the cost account to associate with the cardholder.
nameOnCardoptionalThe name to display on the cards for the cardholder.
noteoptionalAdditional notes for the cardholder.
metadataoptionalA set of key-value pairs that you can attach to a cardholder object. It can be useful for storing additional information about the cardholder in a structured format.

Returns

Returns a cardholder object if the call succeeded.

Retrieve a cardholder

Retrieves the details of an existing cardholder.

Action URL

GET /api/v1/cardholders/:id

Arguments

id (path)requiredThe identifier of the cardholder to be retrieved.

Returns

Returns a cardholder object if a valid identifier was provided.

Update a cardholder

Updates the specified cardholder.

Action URL

POST /api/v1/cardholders/:id

Arguments

id (path)requiredThe identifier of the cardholder to update.
personoptionalThe identifier of the new person who this cardholder will belong to.
profilerequiredThe identifier of the new profile for this cardholder.
loginIdoptionalThe username to use for the profile.
emailoptionalThe email to use for the profile.
businessUnitoptionalThe identifier of the business unit to associate with the cardholder.
externalCompanyoptionalThe identifier of the external company to associate with the cardholder.
departmentoptionalThe identifier of the department to associate with the cardholder.
startDateoptionalThe date that the cardholder should become active from.
endDateoptionalThe date that the cardholder should remain active until.
statusoptionalThe status of the cardholder. One of: activated, blocked, expired, blacklisted, linked, or unlinked.
locationoptionalThe identifier of the location to associate with the cardholder.
costAccountoptionalThe identifier of the cost account to associate with the cardholder.
nameOnCardoptionalThe name to display on the cards for the cardholder.
noteoptionalAdditional notes for the cardholder.
metadataoptionalA set of key-value pairs that you can attach to a cardholder object. It can be useful for storing additional information about the cardholder in a structured format.

Returns

Returns the cardholder object if the update succeeded. Returns an error if update parameters are invalid (e.g. specifying an invalid email or an invalid status).

Delete a cardholder

Permanently deletes a cardholder. It cannot be undone.

Action URL

DELETE /api/v1/cardholders/:id

Arguments

id (path)requiredThe identifier of the cardholder to be deleted.

Returns

Returns an empty response on success. If the cardholder ID does not exist, this call returns an error.

List all cardholders

Returns a list of cardholders.

Action URL

GET /api/v1/cardholders

Arguments

q (query)optionalOnly return cardholders that mention the given search term.
person (query)optionalThe ID of the person whose cardholders will be retrieved.
profile (query)optionalOnly return cardholders for the given profile ID.
business_unit (query)optionalOnly return cardholders for the given business unit ID.
external_company (query)optionalOnly return cardholders for the given external company ID.
department (query)optionalOnly return cardholders for the given department ID.
location (query)optionalOnly return cardholders for the given location ID.
cost_account (query)optionalOnly return cardholders for the given cost account ID.
status (query)optionalOnly return cardholders with the given status. One of: activated, blocked, expired, blacklisted, linked, or unlinked.
starting_after (query)optionalOnly return cardholders that start after the given date.
ending_before (query)optionalOnly return cardholders that end before the given date.
page (query)optionalA cursor for use in pagination that defines your place in the list based on the number of objects to be returned. The default is 1.
per_page (query)optionalA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 15.

Returns

A list of up to per_page cardholders, starting at page. Passing the optional search query will result in filtering to only cardholders that mention the supplied value. Passing any of the optional filters will result in filtering to cardholders with only those exact values. Each entry in the list is a separate cardholder object. If no more cardholders are available, the resulting list will be empty. The response will contain two extra headers, Link and X-Total-Count, which provide convenience URLs to the first, last, next, and/or previous pages, and the total number of objects based on the supplied search criteria.

Cards

Card objects contain information about a physical card that can be used for access control.

The card object

Attributes

idstring(guid)Unique identifier for the object.
cardholderstring(guid)ID of the cardholder that the card belongs to.
cardNumberstringUnique, displayable identifier for the card.
chipserialNumberstringChip serial number of the card.
statusstringStatus of the card. One of: initialized, in_production, personalized, withdrawn, activated, blocked, expired, blacklisted, issued, returned, destroyed, bulk_blocked, linked, or unlinked.
typeobjectObject describing the card's type.
encryptionstringEncryption method used for the card. One of: aes, des, or triple_des.
layoutobjectObject describing the card's layout.
startDatestring(date-time)Start date of the card.
endDatestring(date-time)End date of the card.
pickupNoticebooleanCurrently not used.
metadataobjectSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
createdstring(date-time)Time at which the object was created.

Create a card

Creates a new card object.

Action URL

POST /api/v1/cards

Arguments

cardholderrequiredThe identifier of the cardholder to add the card to.
metadataoptionalA set of key-value pairs that you can attach to a card object. It can be useful for storing additional information about the card in a structured format.

Returns

Returns a card object if the call succeeded.

Retrieve a card

Retrieves the details of an existing card.

Action URL

GET /api/v1/cards/:id

Arguments

id (path)requiredThe identifier of the card to be retrieved.

Returns

Returns a card object if a valid identifier was provided.

Update a card

Updates the specified card.

Action URL

POST /api/v1/cards/:id

Arguments

id (path)requiredThe identifier of the card to update.
statusoptionalThe new status of the card. One of: initialized, in_production, personalized, withdrawn, activated, blocked, expired, blacklisted, issued, returned, destroyed, bulk_blocked, linked, or unlinked.
metadataoptionalA set of key-value pairs that you can attach to a card object. It can be useful for storing additional information about the card in a structured format.

Returns

Returns the card object if the update succeeded. Returns an error if update parameters are invalid (e.g. specifying an invalid status or invalid metadata).

Delete a card

Cards cannot be deleted.

List all cards

Returns a list of cards.

Action URL

GET /api/v1/cards

Arguments

q (query)optionalOnly return cards that mention the given search term.
cardholder (query)optionalThe ID of the cardholder whose cards will be retrieved.
status (query)optionalOnly return cards with the given status. One of: initialized, in_production, personalized, withdrawn, activated, blocked, expired, blacklisted, issued, returned, destroyed, bulk_blocked, linked, or unlinked.
type (query)optionalOnly return cards of the given type.
encryption (query)optionalOnly return cards using the given encryption method. One of: aes, des, or triple_des.
layout (query)optionalOnly return cards with the given layout.
starting_after (query)optionalOnly return cards that start after the given date.
ending_before (query)optionalOnly return cards that end before the given date.
page (query)optionalA cursor for use in pagination that defines your place in the list based on the number of objects to be returned. The default is 1.
per_page (query)optionalA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 15.

Returns

A list of up to per_page cards, starting at page. Passing the optional search query will result in filtering to only cards that mention the supplied value. Passing any of the optional filters will result in filtering to cards with only those exact values. Each entry in the list is a separate card object. If no more cards are available, the resulting list will be empty. The response will contain two extra headers, Link and X-Total-Count, which provide convenience URLs to the first, last, next, and/or previous pages, and the total number of objects based on the supplied search criteria.

Persons

Person objects contain basic information about a person.

The person object

Attributes

idstring(guid)Unique identifier for the object.
personNumberstringUnique, displayable identifier for the person.
profilestring(guid)ID of the person's profile.
addressPreferencestringPerson's preferred address type. One of: home, business, or po_box.
identificationTypestringPerson's preferred method of identification. One of: none, driver_license, passport, eu, or foreigner.
identificationTypeValuestringValue for the person's specified identification method.
firstNamestringFirst name of the person.
middleNamestringMiddle name of the person.
lastNamestringLast name of the person.
birthDatestring(date)Person's birthday, represented as an ISO 8601:2004 YYYY-MM-DD format.
genderstringPerson's gender. One of: not_specified, female, male, other, or decline.
prefixstringPerson's name prefix. One of: none, dr, mr, mrs, or ms.
suffixstringPerson's name suffix. One of: none, ii, iii, iv, jr, md, phd, or sr.
phoneNumberstringPerson's preferred telephone number. E.164 is recommended as the format of this value, for example, +1 (425) 555-1212 or +56 (2) 687 2400.
mobileNumberstringPerson's preferred mobile number. E.164 is recommended as the format of this value, for example, +1 (425) 555-1212 or +56 (2) 687 2400.
statusstringStatus of the person. One of: none, activated, blocked, expired, blacklisted, linked, or unlinked.
metadataobjectSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
photostring(base-64)Person's photo.
createdstring(date-time)Time at which the object was created.
addresseslist, contains: address objectList of the person's addresses.
cardholderslist, contains: cardholder objectList of cardholders belonging to the person.

Create a person

Creates a new person object.

Action URL

POST /api/v1/persons

Arguments

profileoptionalThe identifier of the profile for the person.
addressPreferenceoptionalThe person's preferred address type. One of: home, business, or po_box.
identificationTypeoptionalThe person's preferred method of identification. One of: none, driver_license, passport, eu, or foreigner.
identificationTypeValueoptionalThe value for the person's specified identification method.
firstNamerequiredThe person's first name.
middleNameoptionalThe person's middle name.
lastNamerequiredThe person's last name.
birthDaterequiredThe person's birthday, represented as an ISO 8601:2004 YYYY-MM-DD format.
genderoptionalThe person's gender. One of: not_specified, female, male, other, or decline.
prefixoptionalThe person's name prefix. One of: none, dr, mr, mrs, or ms.
suffixoptionalThe person's name suffix. One of: none, ii, iii, iv, jr, md, phd, or sr.
phoneNumberoptionalThe person's preferred telephone number. E.164 is recommended as the format of this value, for example, +1 (425) 555-1212 or +56 (2) 687 2400.
mobileNumberoptionalThe person's preferred mobile number. E.164 is recommended as the format of this value, for example, +1 (425) 555-1212 or +56 (2) 687 2400.
statusoptionalThe person's status. One of: none, activated, blocked, expired, blacklisted, linked, or unlinked.
metadataoptionalA set of key-value pairs that you can attach to a person object. It can be useful for storing additional information about the person in a structured format.
photooptionalThe person's photo.

Returns

Returns a person object if the call succeeded.

Retrieve a person

Retrieves the details of an existing person.

Action URL

GET /api/v1/persons/:id

Arguments

id (path)requiredThe identifier of the person to be retrieved.

Returns

Returns a person object if a valid identifier was provided.

Update a person

Updates the specified person.

Action URL

POST /api/v1/persons/:id

Arguments

id (path)requiredThe identifier of the person to update.
profileoptionalThe identifier of the new profile for this person.
addressPreferenceoptionalThe person's preferred address type. One of: home, business, or po_box.
identificationTypeoptionalThe person's preferred method of identification. One of: none, driver_license, passport, eu, or foreigner.
identificationTypeValueoptionalThe value for the person's specified identification method.
firstNamerequiredThe person's first name.
middleNameoptionalThe person's middle name.
lastNamerequiredThe person's last name.
birthDaterequiredThe person's birthday, represented as an ISO 8601:2004 YYYY-MM-DD format.
genderoptionalThe person's gender. One of: not_specified, female, male, other, or decline.
prefixoptionalThe person's name prefix. One of: none, dr, mr, mrs, or ms.
suffixoptionalThe person's name suffix. One of: none, ii, iii, iv, jr, md, phd, or sr.
phoneNumberoptionalThe person's preferred telephone number. E.164 is recommended as the format of this value, for example, +1 (425) 555-1212 or +56 (2) 687 2400.
mobileNumberoptionalThe person's preferred mobile number. E.164 is recommended as the format of this value, for example, +1 (425) 555-1212 or +56 (2) 687 2400.
statusoptionalThe person's status. One of: none, activated, blocked, expired, blacklisted, linked, or unlinked.
metadataoptionalA set of key-value pairs that you can attach to a person object. It can be useful for storing additional information about the person in a structured format.
photooptionalThe person's photo.

Returns

Returns the person object if the update succeeded. Returns an error if update parameters are invalid (e.g. specifying an invalid identification method or not specifying a birthday).

Delete a person

Permanently deletes a person. It cannot be undone.

Action URL

DELETE /api/v1/persons/:id

Arguments

id (path)requiredThe identifier of the person to be deleted.

Returns

Returns an empty response on success. If the person ID does not exist, this call returns an error.

List all persons

Returns a list of persons.

Action URL

GET /api/v1/persons

Arguments

q (query)optionalOnly return persons that mention the given search term.
address_preference (query)optionalOnly return persons who have the given address preference. One of: home, business, or po_box.
id_type (query)optionalOnly return persons who use the given method of identification. One of: none, driver_license, passport, eu, or foreigner.
gender (query)optionalOnly return persons of the given gender. One of: not_specified, female, male, other, or decline.
prefix (query)optionalOnly return persons with the given name prefix. One of: none, dr, mr, mrs, or ms.
suffix (query)optionalOnly return persons with the given name suffix. One of: none, ii, iii, iv, jr, md, phd, or sr.
production_status (query)optionalOnly return persons who have a card in the given production stage. One of: to_be_created, to_be_produced, produced, or to_be_activated.
page (query)optionalA cursor for use in pagination that defines your place in the list based on the number of objects to be returned. The default is 1.
per_page (query)optionalA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 15.

Returns

A list of up to per_page persons, starting at page. Passing the optional search query will result in filtering to only persons that mention the supplied value. Passing any of the optional filters will result in filtering to persons with only those exact values. Each entry in the list is a separate person object. If no more persons are available, the resulting list will be empty. The response will contain two extra headers, Link and X-Total-Count, which provide convenience URLs to the first, last, next, and/or previous pages, and the total number of objects based on the supplied search criteria.

Productions

Production objects contain information related to the production of a single card.

The production object

Attributes

idstring(guid)Unique identifier for the object.
personstring(guid)ID of the person associated with the production.
cardholderstring(guid)ID of the cardholder associated with the production.
cardstring(guid)ID of the card associated with the production.
nameOnCardstringName that will be displayed on the card.
chipserialNumberstringChip serial number of the card.
userNamestringUser who initiated the card production process.
exportedbooleanIndicates whether the card has been exported.
printedOnstring(date-time)Date the card was printed.
numberOfTriesintegerNumber of tries needed to successfully print the card.

Create a production

Production records cannot be manually created. They are automatically created when a card enters the 'in production' state.

Retrieve a production

Retrieves the details of an existing production record.

Action URL

GET /api/v1/productions/:id

Arguments

id (path)requiredThe identifier of the production record to be retrieved.

Returns

Returns a production object if a valid identifier was provided.

Update a production

Updates the specified production record.

Action URL

POST /api/v1/productions/:id

Arguments

id (path)requiredThe identifier of the production record to update.
nameOnCardoptionalThe name to display on the card.
chipserialNumberoptionalThe chip serial number of the card.
userNameoptionalThe user associated with the production.
printedOnoptionalThe date the card was printed.
numberOfTriesoptionalThe number of tries needed to successfully print the card.

Returns

Returns the production object if the update succeeded. Returns an error if update parameters are invalid (e.g. specifying an invalid number of tries or an invalid date).

Delete a production

Production records cannot be manually deleted. They are automatically deleted when a card leaves the 'in production' state.

List all productions

Returns a list of production records.

Action URL

GET /api/v1/productions

Arguments

q (query)optionalOnly return production records that mention the given search term.

Returns

A list of up to per_page records, starting at page. Passing the optional search query will result in filtering to only records that mention the supplied value. Passing any of the optional filters will result in filtering to records with only those exact values. Each entry in the list is a separate production object. If no more records are available, the resulting list will be empty. The response will contain two extra headers, Link and X-Total-Count, which provide convenience URLs to the first, last, next, and/or previous pages, and the total number of objects based on the supplied search criteria.