Cardly v2 API
The version 2 Cardly API is organised around REST, with predictable resource-oriented URLs. It accepts JSON-encoded request bodies, returns JSON-encoded responses and uses standard HTTP response codes and verbs to make understanding and integrating the API as quick and painless as possible.
When you're set up on the Cardly API, you'll be provided with two API keys - one for test mode, the other for live calls. Your test mode key will allow you to make all the calls available in the API, however won't mutate any data. So, you can test your integration and make sure everything works, get back (generally!) the same response as you would for a live call, then switch out your keys when you're ready to move to live ordering.
Currently the API accepts only JSON-encoded bodies for POST requests. As such, please ensure you provide the appropriate Content-type: text/json
header when forming your requests. Other content types will likely fail as the request body will not be interpreted correctly.
As we release new products and features, the Cardly API will evolve to include access to these where possible. This documentation will also evolve to cover these new features as they're released.
While we do our best to avoid it, in the event we release a breaking change, we'll let you know well in advance so you have time to plan, test and release any updates necessary to accommodate the change.
Authentication
The Cardly API uses API keys to authenticate requests. Your API keys can be obtained and managed from your organisation portal.
Each set of API keys provides both test and live mode keys. Test mode keys are prefixed with test_
and can perform all the functions that live keys can, however they will not perform any mutations. That is, if a test mode key calls the Place Order endpoint, the request will be validated and provide a mostly-identical response as though you'd used a live key, however no actual order will be placed. Test mode responses will always contain a testMode: true
element as part of the main return body.
Live mode keys are prefixed with live_
and have none of the restrictions of test mode keys.
Authentication to the API is performed via the API-Key
header, as per the provided example.
API keys permit many functions to be performed against your organisation, including billable requests. You must keep your keys secure and if you believe them to be compromised, invalidate and re-issue your keys via your organisation portal.
All API requests must be performed over HTTPS. Calls made over plain HTTP will be rejected, as will requests without authentication.
Return Structure
All returns from the Cardly API will present as a JSON-encoded body with the same overall structure: an element to denote the overall call success, along with any relevant messages, a data element to pass back data relevant to the call performed, and optionally a flag to indicate the request was performed in test mode.
Additionally, HTTP status codes can also help inform your request's success. Typically, you can rely on 200 - OK
and 201 - Created
response codes to indicate success.
We highly recommend checking for the presence of testMode: true
to ensure you are not accidentally processing live requests with a testing key.
-
state.statusstring
-
A code to indicate the overall success of the call. One of
OK
,WARN
orERROR
. -
state.messagesarray
-
A list of feedback messages to provide more information on a failure, or optionally warnings for successful calls.
-
dataobject
-
If this call results in any data to be passed back to the caller, the structure will be located here.
Data structures differ per call and are detailed in the relevant API functions below.
{ "state": { "status": "OK", "messages": [] }, "data": { ... }, "testMode": true }
Errors
The API uses standard HTTP response codes to indicate the success or failure of your API requests. Generally, codes in the 2xx
range indicate success. Codes in the 4xx
range indicate issues due to the data provided - authentication failures, required fields missing, insufficient funds etc. Codes in the 5xx
range indicate an error on Cardly's end - these should be rare!
Where possible, we'll provide you with information on why your call failed to help you quickly diagnose and remedy the issue.
- 200 - OK
The request processed as expected.
- 201 - Created
The request processed, creating a relevant resource as expected.
- 400 - Bad Request
The request failed, likely due to missing data.
- 401 - Unauthorized
No valid API key was supplied.
- 402 - Request Failed
The request passed validation, but failed for another reason.
- 403 - Forbidden
The passed API key does not have privileges to perform the requested operation.
- 404 - Not Found
The requested resource does not exist.
- 422 - Unprocessable Entity
The request failed, likely due to one or more fields not passing validation.
- 429 - Too Many Requests
You have performed too many requests to the API in a short period of time. We recommend slowing down your request rate and implementing exponential backoff of your requests.
- 500 - Internal Server Error
- Something went wrong on Cardly's end. We're likely already looking into it!
Idempotent Requests
The Cardly API supports idempotent requests, allowing you to safely retry requests without accentially performing the same operation twice. This is extremely useful when your API call is distrupted and you do not receive a response, or fail to complete processing of this response on your applications end (due to loss of connectivity etc).
For example, if a request to the Place Order endpoint does not result in a response, or the response times out, you can retry the exact same request again and receive the response you would have otherwise missed. This helps guarantee the original request you wanted to make is processed once, and once only.
To perform a request utilising Idempotency, supply an additional Idempotency-Key: <key>
header in your request.
The API's idempotency works by saving the resulting status code and body of the original request for any given idempotency key, regardless of success. Subsequent requests with the same key return the same result, without hitting the processing layer.
Your idempotency keys are unique values generated by your client which the API uses to identify subsequent retries of the same request. Generation and format of idempotency keys is up to you, however Cardly recommends v4 UUIDs or another random string of sufficent length to guarantee uniqueness. Your idempotency keys may be up to 64 characters in length.
In addition, to ensure you do not accidentally reuse or change your original request when utilising idempotency keys, we analyse the incoming request to ensure it is consistent with any previously logged request. In the event an idempotency result is found with a different request signature, you'll receive an error indicating the request was changed, but an idempotency key was being reused.
Idempotent results will only be saved if the request started started processing - if the request failed due to invalid credentials, missing parameters etc, the idempotency key will not be consumed by the request. You can therefore safely re-use idempotency keys until a successful operation is processed.
Please note that only POST
requests accept idempotency keys. All other HTTP verbs currently in use by the Cardly API will ignore idempotency keys, as these requests are idempotent by definition.
Request IDs
Every API request performed will return an associated request identifier in the response headers. You can find this in your response under the Request-Id
header. You will also be able to find request identifiers within your organisation portal API logs.
If you need to contact us for support, particularly with regard to a specific request, providing the relevant Request-Id
will help us to resolve your query as quickly as possible.
Pagination
Most top-level endpoints in the API provide support for bulk fetches for list-style data. The request and response formats for these calls share a common structure to simplify understanding these calls. They all at minimum accept the following parameters: limit
and offset
.
To navigate lists of paginated data, simply increase the offset
parameter by the limit
value you are utilising (or the default of 25
if you aren't specifying a limit). Ensure that you don't navigate past the end of a resource list by checking to ensure your offset is below the meta.totalRecords
value in the previous response.
-
limitinteger
-
The maximum number of records to return. Minimum: 1, maxium: 100, default: 25.
-
pageinteger
-
The page of results to retrieve based on the
limit
parameter.
-
meta.startRecordinteger
-
The row number (1-based) of the first record in the result set.
-
meta.lastRecordinteger
-
The row number (1-based) of the last record in the result set.
-
meta.limitinteger
-
The maximum number of records in this result set.
-
meta.pageinteger
-
The page number of the results being displayed, based on the specified row limit.
-
meta.offsetinteger
-
The number of rows offset from the start of this result set.
-
meta.totalRecordsinteger
-
The total number of results in the entire result set, ignoring pagination limits.
-
resultsarray
-
The list of result records for a given endpoint call.
GET
/v2/art?limit=10&offset=20{ "state": { "status": "OK", "messages": [] }, "data": { "meta": { "startRecord": 21, "lastRecord": 30, "limit": 10, "offset": 20, "totalRecords": 134 }, "results": [ ... ] } }
Testing & Development Helpers
Echo provides a simple, low impact means of testing API features. We'll simply take your request, headers and body parameters and return these back to you in a standard structure.
This way you can quickly test your authentication, idempotency behaviour and get a feel for the API features before diving in to real requests.
/v2/echo
Echo Request
The echo
endpoint will take any parameters, body structure and headers and return them to you in a JSON structure. You can use this endpoint to quickly debug other requests, validate your authentication, idempotency and other API features without any impact on your account or any risk of credit usage.
This endpoint is special in that it will accept any HTTP verb and still provide an output to the caller.
Please note: you must still authenticate to this endpoint and you'll receive appropriate error responses if your API key is invalid or not supplied.
{
"foo": "bar",
"array": ["A", "B", "C"]
}
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"method": "POST",
"url": "https://api.card.ly/v2/echo",
"headers": {
"api-key": "test_QRJ***73X",
"content-type": "application/json",
"accept": "*/*",
"cache-control": "no-cache",
"host": "api.card.ly",
"accept-encoding": "gzip, deflate",
"content-length": "60",
"connection": "keep-alive"
},
"params": {
"test": "foo"
},
"body": {
"foo": "bar",
"array": [
"A",
"B",
"C"
]
}
},
"testMode": true
}
Account
Account functions aid with checking your organistaion's current balance, reviewing previous transactions, adding more credit and performing updates to organisation details.
/v2/account/balance
/v2/account/credit-history
/v2/account/gift-credit-history
Credit History Object
The credit history object models an entry - positive or negative - for the organisation's credit purchase and spends.
-
idUUID
-
Unique identifier for this credit history entry.
-
orderIdUUID
-
Identifier for an order that triggered this credit history entry. Generally used whenever paid transactions take place.
-
transactionIdUUID
-
Identifier for a transaction that triggered this credit history entry, typically related to the purchase of credits.
-
typestring
-
A human-readable, brief description of what this entry is for, ie;
Credit Purchase
,Order Placement
. -
changefloat
-
Value that was either credited or debited from the organisation in this action.
-
effectiveTimedatetime
-
Timestamp of when this credit history entry occurred.
{
"id": "ef974e61-8496-0de9-446c-ffc21bf7e2e2",
"orderId": null,
"transactionId": null,
"type": "Credit",
"change": 120,
"effectiveTime": "2019-11-23 12:10:54"
}
Gift Credit History Object
The gift credit history object models an entry - positive or negative - for the organisation's gift credit purchase and spends.
-
idUUID
-
Unique identifier for this gift credit history entry.
-
orderIdUUID
-
Identifier for an order that triggered this gift credit history entry. Generally used whenever paid transactions take place.
-
transactionIdUUID
-
Identifier for a transaction that triggered this gift credit history entry, typically related to the purchase of credits.
-
typestring
-
A human-readable, brief description of what this entry is for, ie;
Credit Purchase
,Order Placement
. -
changefloat
-
Value that was either credited or debited from the organisation in this action.
-
changeNetfloat
-
Value that was either credited or debited from the organisation in this action, exclusive of tax.
-
changeTaxfloat
-
Tax component for this transaction, were relevant. Note that currently no region involves taxed gift card payments.
-
effectiveTimedatetime
-
Timestamp of when this credit history entry occurred.
{
"id": "ef974e61-8496-0de9-446c-ffc21bf7e2e2",
"orderId": null,
"transactionId": null,
"type": "Credit",
"change": 120,
"effectiveTime": "2019-11-23 12:10:54"
}
Account Balance
This endpoint allows you to quickly query the current balance for your organisation.
Where relevant, API calls which consume or have the potential to consume balance will return your organisation's balance in the return structure for convenience. This will allow you to easily determine if additional balance should be added to your account if not utilising the automatic account topup feature.
-
balancefloat
-
Your organisation's current card credit balance. Note that this may not be a whole number.
-
giftCredit.balancefloat
-
Your organisation's current gift credit balance. Note that this may not be a whole number.
-
giftCredit.currencyfloat
-
The currency your organisation's gift balance is held in.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"balance": 123,
"giftCredit": {
"balance": 145.43,
"currency": "USD"
}
},
"testMode": true
}
Credit History
Retrieve a section of balance history records pertaning to your organistaion. This will list both credits and debits, along with links / reasons for each, where applicable.
This request accepts standard pagination options limit, offset
along with the following additional filters:
-
effectiveTime.ltdatetime
-
YYYY-MM-DD HH:ii:ss
formatted string to retrieve only results before this time. -
effectiveTime.ltedatetime
-
YYYY-MM-DD HH:ii:ss
formatted string to retrieve only results before or equal to this time. -
effectiveTime.gtdatetime
-
YYYY-MM-DD HH:ii:ss
formatted string to retrieve only results after this time. -
effectiveTime.gtedatetime
-
YYYY-MM-DD HH:ii:ss
formatted string to retrieve only results after or equal to this time.
-
resultsarray
-
A paginated array of zero or more
Credit History
objects.
(No body required)
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 5,
"limit": 25,
"offset": 0,
"totalRecords": 5
},
"results": [
{
"id": "484ed6af-416e-1f76-7807-c88104734f09",
"orderId": null,
"transactionId": null,
"type": "Signup Bonus",
"change": 3,
"effectiveTime": "2019-11-23 12:10:54"
},
...
]
}
}
Gift Credit History
Retrieve a section of gift credit history records pertaning to your organistaion. This will list both credits and debits, along with links / reasons for each, where applicable.
This request accepts standard pagination options limit, offset
along with the following additional filters:
-
effectiveTime.ltdatetime
-
YYYY-MM-DD HH:ii:ss
formatted string to retrieve only results before this time. -
effectiveTime.ltedatetime
-
YYYY-MM-DD HH:ii:ss
formatted string to retrieve only results before or equal to this time. -
effectiveTime.gtdatetime
-
YYYY-MM-DD HH:ii:ss
formatted string to retrieve only results after this time. -
effectiveTime.gtedatetime
-
YYYY-MM-DD HH:ii:ss
formatted string to retrieve only results after or equal to this time.
-
resultsarray
-
A paginated array of zero or more
Gift Credit History
objects.
(No body required)
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 5,
"limit": 25,
"offset": 0,
"totalRecords": 5
},
"results": [
{
"id": "ee63a362-929b-5cb5-4db2-b7f2b273d39a",
"orderId": "85658025-f4bb-1af7-bcb6-ddd3078aa9d4",
"transactionId": null,
"type": "Debit",
"typeCode": "D",
"currency": "AUD",
"change": -89.34,
"changeNet": -89.34,
"changeTax": 0,
"newBalance": 2064.1,
"effectiveTime": "2022-07-18 02:26:00",
"notes": "Payment for order 85658025-f4bb-1af7-bcb6-ddd3078aa9d4 lodged at 18/07/2022 12:26:00"
},
...
]
}
}
Artwork
Artwork functions allow you to retrieve, add and update your organisation's current available artwork. The identifiers used in artwork models are required in other calls such as Place Order
and these endpoints can facilitate finding or creating these programatically if required.
/v2/art
/v2/art
/v2/art/{id}
/v2/art/{id}
/v2/art/{id}
Artwork Object
The artwork object represents a product at a given media size and provides preview images for each page capable of hosting artwork imagery.
-
idstring
-
Unique identifier for this piece of artwork. To be passed through to
Place Order
and similar calls requiring artwork IDs. -
revisioninteger
-
The revision number of this piece of artwork. Revision increases when artwork descriptors or image assets change.
-
namestring
-
The title of this piece of artwork.
-
slugstring
-
A search-engine-friendly identifier for this artwork. Can be added to your organisation domain to provide a path to the artwork's page, ie
/test-organisation/artwork-slug
. -
descriptionstring
-
A longer description of the artwork.
-
artworkarray
-
A list of URLs for preview images of each page in the artwork document, without customisations. Any pages without artwork will return
null
. -
mediaMedia Object
-
The media size associated with this piece of artwork..
-
createdAtdatetime
-
YYYY-MM-DDTHH:ii:ss+00:00
formatted string to denote when this piece of artwork was created. -
updatedAtdatetime
-
YYYY-MM-DDTHH:ii:ss+00:00
formatted string to denote when this piece of artwork was last updated.
{
"id": "2862abe8-a299-30f2-6324-bd891e687f0d",
"revision": 8,
"name": "API Artwork Upload",
"slug": "api-artwork-upload",
"description": "Testing adding a 4p card via API call.",
"artwork": [
"https://www.cardly.net/card/1/2862abe8-a299-30f2-6324-bd891e687f0d/page1-r2-i6142-04ebfa87e8f09f1127d6f0c4a27e02c9.png/vp/detail-card/1200",
null,
"https://www.cardly.net/card/3/2862abe8-a299-30f2-6324-bd891e687f0d/page3-r2-i6142-6ea511b3b4d4e99bd41188704026cecc.png/vp/detail-card/1200",
null
],
"media": {
...
},
"createdAt": "2020-06-14T09:40:09+10:00",
"updatedAt": "2020-06-14T14:39:35+10:00"
}
Artwork Listing
Retrieve the currently available artwork for your organisation.
-
ownOnlyboolean
-
If set to a truthy value, results will contain only artwork that belongs to your organisation and no shared or freely available artwork. Defaults to false, showing all artwork.
-
resultsarray
-
A paginated array of zero or more
Artwork
objects.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 5,
"limit": 25,
"offset": 0,
"totalRecords": 5
},
"results": [
{
"id": "2862abe8-a299-30f2-6324-bd891e687f0d",
"revision": 8,
"name": "API Artwork Upload",
"slug": "api-artwork-upload",
"description": "Testing adding a 4p card via API call.",
"artwork": [
"https://www.cardly.net/card/1/2862abe8-a299-30f2-6324-bd891e687f0d/page1-r2-i6142-04ebfa87e8f09f1127d6f0c4a27e02c9.png/vp/detail-card/1200",
null,
"https://www.cardly.net/card/3/2862abe8-a299-30f2-6324-bd891e687f0d/page3-r2-i6142-6ea511b3b4d4e99bd41188704026cecc.png/vp/detail-card/1200",
null
],
"media": {
...
},
"createdAt": "2020-06-14T09:40:09+10:00",
"updatedAt": "2020-06-14T14:39:35+10:00"
},
...
]
}
}
Get Artwork
Retrieve information on a specific piece of artwork.
-
(Data Body)Artwork Object
-
An artwork object representing the requested piece of artwork..
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"id": "2862abe8-a299-30f2-6324-bd891e687f0d",
"revision": 8,
"name": "API Artwork Upload",
"slug": "api-artwork-upload",
"description": "Testing adding a 4p card via API call.",
"artwork": [
"https://www.cardly.net/card/1/2862abe8-a299-30f2-6324-bd891e687f0d/page1-r2-i6142-04ebfa87e8f09f1127d6f0c4a27e02c9.png/vp/detail-card/1200",
null,
"https://www.cardly.net/card/3/2862abe8-a299-30f2-6324-bd891e687f0d/page3-r2-i6142-6ea511b3b4d4e99bd41188704026cecc.png/vp/detail-card/1200",
null
],
"media": {
...
},
"createdAt": "2020-06-14T09:40:09+10:00",
"updatedAt": "2020-06-14T14:39:35+10:00"
}
}
Add Artwork
Add a new piece of artwork.
-
mediaUUID
-
UUID for the card size this artwork is for.
-
namestring
-
A short description for this artwork.
-
descriptionstring
-
A longer human-readable description of the artwork.
-
artworkarray
-
A list of pages and associated images to attach to this artwork.
-
artwork[].pageinteger
-
1-based identifier for the page this artwork file relates to.
-
artwork[].imagestring
-
Base64 encoded string containing the content of the image file.
-
(Data Body)Artwork Object
-
The artwork object representing the artwork that was just created. Use the ID property from this to feed into order/preview requests as needed.
{
"media": "fd7368b0-ad4d-11ea-9da9-04d4c4254e1b",
"name": "Awesome Artwork",
"description": "Featuring large amounts of awesome and things.",
"artwork": [
{"page": 1, "image": "iVBORw0KGg..."},
{"page": 3, "image": "iVBORw0KGg..."}
]
}
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"id": "2862abe8-a299-30f2-6324-bd891e687f0d",
"revision": 8,
"name": "API Artwork Upload",
"slug": "api-artwork-upload",
"description": "Testing adding a 4p card via API call.",
"artwork": [
"https://www.cardly.net/card/1/2862abe8-a299-30f2-6324-bd891e687f0d/page1-r2-i6142-04ebfa87e8f09f1127d6f0c4a27e02c9.png/vp/detail-card/1200",
null,
"https://www.cardly.net/card/3/2862abe8-a299-30f2-6324-bd891e687f0d/page3-r2-i6142-6ea511b3b4d4e99bd41188704026cecc.png/vp/detail-card/1200",
null
],
"media": {
...
},
"createdAt": "2020-06-14T09:40:09+10:00",
"updatedAt": "2020-06-14T14:39:35+10:00"
}
}
Update Artwork
Update a piece of artwork with new descriptors or images. All parameters are optional, and only supplied parameters will be updated.
-
namestring
-
A short description for this artwork.
-
descriptionstring
-
A longer human-readable description of the artwork.
-
artworkarray
-
A list of pages and associated images to attach to this artwork.
-
artwork[].pageinteger
-
1-based identifier for the page this artwork file relates to.
-
artwork[].imagestring
-
Base64 encoded string containing the content of the image file.
-
(Data Body)Artwork Object
-
The artwork object representing the artwork that was updated.
{
"media": "fd7368b0-ad4d-11ea-9da9-04d4c4254e1b",
"name": "Awesome Artwork",
"description": "Featuring large amounts of awesome and things.",
"artwork": [
{"page": 1, "image": "iVBORw0KGg..."},
{"page": 3, "image": "iVBORw0KGg..."}
]
}
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"id": "2862abe8-a299-30f2-6324-bd891e687f0d",
"revision": 8,
"name": "API Artwork Upload",
"slug": "api-artwork-upload",
"description": "Testing adding a 4p card via API call.",
"artwork": [
"https://www.cardly.net/card/1/2862abe8-a299-30f2-6324-bd891e687f0d/page1-r2-i6142-04ebfa87e8f09f1127d6f0c4a27e02c9.png/vp/detail-card/1200",
null,
"https://www.cardly.net/card/3/2862abe8-a299-30f2-6324-bd891e687f0d/page3-r2-i6142-6ea511b3b4d4e99bd41188704026cecc.png/vp/detail-card/1200",
null
],
"media": {
...
},
"createdAt": "2020-06-14T09:40:09+10:00",
"updatedAt": "2020-06-14T14:39:35+10:00"
}
}
Delete Artwork
Delete a piece of artwork owned by your organisation.
-
(Data Body)Artwork Object
-
The artwork object representing the artwork that was deleted.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"id": "2862abe8-a299-30f2-6324-bd891e687f0d",
"revision": 8,
"name": "API Artwork Upload",
"slug": "api-artwork-upload",
"description": "Testing adding a 4p card via API call.",
"artwork": [
"https://www.cardly.net/card/1/2862abe8-a299-30f2-6324-bd891e687f0d/page1-r2-i6142-04ebfa87e8f09f1127d6f0c4a27e02c9.png/vp/detail-card/1200",
null,
"https://www.cardly.net/card/3/2862abe8-a299-30f2-6324-bd891e687f0d/page3-r2-i6142-6ea511b3b4d4e99bd41188704026cecc.png/vp/detail-card/1200",
null
],
"media": {
...
},
"createdAt": "2020-06-14T09:40:09+10:00",
"updatedAt": "2020-06-14T14:39:35+10:00"
}
}
Fonts
The font
endpoints provide data about the fonts available to you within Cardly. This data can be used to build font sample interfaces for external integrations which build and send cards via Cardly for consumer or promotion-based activities.
/v2/fonts
Font Object
The font object models a style of writing available within Cardly, either from our shared library or your exclusive handwriting conversions.
-
idinteger
-
Unique identifier for this font option.
-
namestring
-
A localised, human-readable name for this font.
-
familyVariantsstring
-
The number of font variants this family contains for each character.
-
canHumaniseboolean
-
Whether or not this font is marked for being eligible for humanisation techniques. Typically, screen or machine-readable fonts have this flagged off.
-
restrictedboolean
-
Whether or not this font is exclusive to your organisation, or freely available across the Cardly platform..
{
"id": "481910d1-ff8c-ee8d-efe5-d5f1b3f9113a",
"name": "Brad",
"familyVariants": 3,
"canHumanise": true,
"restricted": false
}
Font Listing
Retrieve your currently available fonts.
-
organisationOnlyboolean
-
If truthy, only return fonts that are exclusive to your organisation.
-
resultsarray
-
A paginated array of zero or more
Font
objects.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 25,
"limit": 25,
"offset": 0,
"totalRecords": 48
},
"results": [
{
"id": "461910d8-ff8c-ee8d-efe5-d5feb3f9113a",
"name": "Brad",
"familyVariants": 3,
"canHumanise": true,
"restricted": false
},
{
"id": "1db8e103-1ee3-21c5-1465-d6bfe5d50117",
"name": "Dawn",
"familyVariants": 3,
"canHumanise": true,
"restricted": false
},
...
]
}
}
Media
The media
endpoints provide data about the types and dimensions of available products within Cardly. This information can be used to validate specifications on new artwork, or see which products are currently on offer in various regions.
Please note: Media sizes are not all available in all regions Cardly covers. Where you attempt to order media from an unsupported region, the relevant endpoint will return an error.
/v2/media
Media Object
The media object models a product available on Cardly and denotes the regions it is available for purchase in. It also provides information on the dimensions of the product, both physical and pixel dimensions for artwork supply.
-
idinteger
-
Unique identifier for this media option.
-
namestring
-
A localised, human-readable name for this product.
-
descriptionstring
-
A longer description of the product, along with any restrictions or important information.
-
creditCostfloat
-
The number of credits that would be consumed when ordering this media type.
-
pagesinteger
-
The total number of pages to this product. A standard greeting card is four pages (front, inner left, inner right, back), while a postcard-style product is two pages (front & back).
-
dimensions.mm.heightdimensions.mm.widthinteger
-
Dimensions of this product in millimeters, exclusive of bleed.
-
bleed.mm.xbleed.mm.yinteger
-
Bleed zone of this product in millimeters, added to the dimensions measurements for the overall page size.
Using the provided example, this would be a 115x158mm product for the purposes of artwork dimensions.
-
art.px.widthart.px.heightinteger
-
Size of the artwork required for this product, in pixels, inclusive of bleed zones.
Please ensure when providing artwork these bleed zones are accounted for in your supplied imagery.
-
art.px.innerWidthart.px.innerHeightinteger
-
Size of the artwork inner area for this product, in pixels, exclusive of bleed zones. Provided for convenience only, all artwork must contain bleed zones as specified above.
{
"id": 3,
"name": "Standard Postcard",
"description": null,
"creditCost": 0.5,
"pages": 2,
"dimensions": {
"mm": {
"height": 105,
"width": 148
}
},
"bleed": {
"mm": {
"x": 5,
"y": 5
}
},
"art": {
"px": {
"width": 2488,
"height": 1811
}
}
Media Listing
Retrieve the currently available media sizes for product artwork.
-
organisationOnlyboolean
-
If truthy, only return media items that are exclusive to your organisation.
-
resultsarray
-
A paginated array of zero or more
Media
objects.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 5,
"limit": 25,
"offset": 0,
"totalRecords": 5
},
"results": [
{
"id": 4,
"name": "148 x 202mm Card",
"description": null,
"creditCost": 1,
"pages": 4,
"dimensions": {
"mm": {
"height": 148,
"width": 111
}
},
"bleed": {
"mm": {
"x": 5,
"y": 5
}
},
"art": {
"px": {
"width": 1905,
"height": 2488
}
}
},
...
]
}
}
Templates
The template
endpoints allow you to retrieve and manipulate templates available to your organisation.
/v2/templates
Style Object
The style object denotes styling options to be applied to a template, card page, or individual element (where applicable). Not all options below have an effect on all elements, however are described here for ease of reference.
-
alignstring
-
One of 'left' (default) or 'center' to denote text flow behaviour.
-
colorstring
-
RRGGBB hex code (without the hash mark) denoting the colour to use for text or doodle elements.
-
fontUUID
-
ID of a font to apply to a text area. Must be either a publically available font or accessible by your organisation.
-
sizeint
-
A number to control the size of rendered text. Note that the actual rendered size depends on both this and settings build in to your selected font style.
-
verticalAlignstring
-
One of 'top' (default), 'center', or 'bottom' to denote where rendered text should sit in relation to the editor page.
-
writingUUID
-
ID of a writing style to apply. Defaults to 'standard' as per the main Cardly editor if not defined.
{
"align": "left",
"color": "1144a7",
"size": 25,
"writing": "987d50c7-25e1-3b1c-aa78-6f60b1411fe5",
"font": "0d372503-c81b-987d-7636-bd6321290528",
"verticalAlign": "top"
}
Template Object
The template object denotes styling and structure to be applied to a given media size card.
-
idUUID
-
Unique identifier for this template option.
-
namestring
-
The human-readable description for this template.
-
slugstring
-
A human-readable identifier for this template unique within your organisation.
-
mediaMedia Object
-
The media object that represents the media size associated with this template.
-
definition.versioninteger
-
The version of the Cardly editor this template was created by.
-
definition.styleobject
-
The default styles to filter through to pages in this template, if no styles are defined at the page level.
-
definition.pages[]array
-
A list of page objects to define page-level objects (doodles, text areas, gift cards etc) and text data, along with individual page style overrides if applicable.
-
definition.variablesobject
-
A list of variables associated with this template, where the property name is the variable key and additional description / example data is provided for each variable.
{
"id": "18ecf6e6-d2e2-49cb-bae0-fa980241db73",
"name": "Happy Birthday",
"slug": "happy-birthday",
"media": (Media Object),
"definition": {
"version": 2,
"style": {
"color": "1144a7",
"size": 25,
"writing": "987d50c7-25e1-3b1c-aa78-6f60b1411fe5",
"font": "0d372503-c81b-987d-7636-bd6321290528"
},
"pages": [
{
"style": {
"align": "left",
"color": "1144a7",
"size": 25,
"writing": "987d50c7-25e1-3b1c-aa78-6f60b1411fe5",
"font": "0d372503-c81b-987d-7636-bd6321290528"
},
"objects": [],
"text": {
"lines": []
}
},
{
"style": {
"align": "left",
"color": "1144a7",
"size": 25,
"writing": "987d50c7-25e1-3b1c-aa78-6f60b1411fe5",
"font": "0d372503-c81b-987d-7636-bd6321290528"
},
"objects": [],
"text": {
"lines": []
}
}
],
"variables": {
"firstName": {
"description": "Customer's first name to display in card front and salutation.",
"example": "John"
},
...
}
}
}
Template Listing
Retrieve the currently available templates for this organisation.
-
resultsarray
-
A paginated array of zero or more
Template
objects.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 5,
"limit": 25,
"offset": 0,
"totalRecords": 5
},
"results": [
{
"id": "18ecf6e6-d2e2-49cb-bae0-fa980241db73",
"name": "Happy Birthday",
"slug": "happy-birthday",
"media": (Media Object),
"definition": {
"version": 2,
"style": {
"color": "1144a7",
"size": 25,
"writing": "987d50c7-25e1-3b1c-aa78-6f60b1411fe5",
"font": "1d372503-c81b-987d-7636-b16321290528"
},
"pages": [
{
"style": {
"align": "left",
"color": "1144a7",
"size": 25,
"writing": "987d50c7-25e1-3b1c-aa78-6f60b1411fe5",
"font": "1d372503-c81b-987d-7636-b16321290528"
},
"objects": [],
"text": {
"lines": []
}
},
{
"style": {
"align": "left",
"color": "1144a7",
"size": 25,
"writing": "987d50c7-25e1-3b1c-aa78-6f60b1411fe5",
"font": "1d372503-c81b-987d-7636-b16321290528"
},
"objects": [],
"text": {
"lines": []
}
}
],
"variables": {
"firstName": {
"description": "Customer's first name to display in card front and salutation.",
"example": "John"
},
...
}
}
},
...
]
}
}
Contact Lists
The contact-lists
endpoints provide the ability to create, manipulate and interrogate lists of users, employees and other contacts. These groupings allow you to then set up automation rules based on fields within your lists (such as a birthday or anniversary date) to automatically send a specified card and message to a user at an appropriate point in future - potentially yearly, if desired.
While contact lists and associated fields can be created and managed by these endpoints, currently automation rules will need to be managed via your Cardly portal. We'll open the ability to do this programatically in future, however given the complex nature of these rules our UI is the best way of managing these for the moment.
/v2/contact-lists
/v2/contact-lists
/v2/contact-lists/{id}
/v2/contact-lists/{id}
Contact List Object
The contact list object provides detail on a given list on your account, along with currently set up custom fields and automation details.
-
idUUID
-
Unique identifier for this contact list.
-
namestring
-
The human-readable name for this list.
-
descriptionstring
-
An extended description on what this list is for or related notes, if required.
-
statusstring
-
The current status of this contact list.
-
contactsinteger
-
The number of unique contacts currently in this list.
-
automationsinteger
-
The number of automation rules (active or disabled) currently applied to this list.
-
fieldsarray
-
List of
Contact List Field
objects that define additional information to store for each contact in the list. -
fields[].idUUID
-
A unique identifier for this field which never changes.
-
fields[].codestring
-
A human-readable code for this field, based on the field name. These don't change and can be used to reference additional data when syncing contacts.
-
fields[].namestring
-
A human-readable label for this field.
-
fields[].descriptionstring
-
Extended information about this field, if required.
-
fields[].typestring
-
The type of field this is, currently one of
text
,date
ornumber
-
fields[].statusstring
-
The status of this field - currently always
active
. -
automationsarray
-
List of
Contact List Automation
objects that define rules to automatically send cards at specified intervals or based on triggers set up in the Cardly platform. -
automations[].idUUID
-
A unique identifier for this automation which never changes.
-
automations[].fieldIdUUID
-
The field ID linked to this validation rule as a trigger.
-
automations[].cardArtIdUUID
-
The card artwork to send based on this trigger.
-
automations[].templateIdUUID
-
The template to use for this trigger.
-
automations[].enabledboolean
-
Whether or not this automation is currently enabled for sending.
-
automations[].namestring
-
A human-readable name for this automation rule.
-
automations[].descriptionstring
-
Extended information on this rule, if required.
-
automations[].operatorstring
-
The type of comparison (eq, db, da, etc) to apply to the trigger field.
-
automations[].valuestring
-
The value to compare to in order to evaluate whether the trigger has succeeded or not.
-
automations[].annualboolean
-
If true and linked to a
date
field, this automation will trigger yearly (ie, for birthday or anniversary type events). -
automations[].bindingsobject
-
Key-value mapped object of template variable code to contact list field for injecting data into the final card template.
-
validationobject
-
High-level stats around the number of contacts pending / completed validation or requiring manual intervention.
-
validation.pendinginteger
-
The total number of contacts pending address validation.
-
validation.requireActioninteger
-
The total number of contacts requiring manual review of their address data.
-
validation.validatedinteger
-
The total number of contacts that have completed address validation.
{
"id": "6d7c260b-f39f-e822-6aa5-612014047d20",
"name": "Online Sales",
"description": null,
"status": "active",
"contacts": 0,
"automations": 0,
"fields": [
{
"id": "9da307a4-1c37-f69a-c6ec-1ba002165d57",
"code": "dateField",
"name": "Date Field",
"description": null,
"type": "date",
"status": "active"
},
{
"id": "b9763d1b-e0fd-77a3-7afb-6edbf07fe087",
"code": "numberField",
"name": "Number Field",
"description": null,
"type": "number",
"status": "active"
},
{
"id": "17ac0886-87d5-e098-337e-6081a1fa969e",
"code": "textField",
"name": "Text Field",
"description": null,
"type": "text",
"status": "active"
}
],
"rules": [
{
"id": "15375e7e-0709-79bc-0db5-f18de014935a",
"fieldId": "9da307a4-1c37-f69a-c6ec-1ba002165d57",
"cardArtId": "8fc7bf89-03d1-3d55-9d9e-f3d615c5bb34",
"templateId": "a8288cf8-689f-4dc3-2fd0-6f6f9c86ecbd",
"enabled": false,
"name": "Trigger 30 Days Before",
"description": null,
"operator": "db",
"value": 30,
"annual": false,
"bindings": {
"name": {
"binding": "firstName",
"format": null
},
"variable": {
"binding": "fullName",
"format": null
}
}
},
{
"id": "45702de2-dee0-2b14-ed52-ae63886f28f1",
"fieldId": "b9763d1b-e0fd-77a3-7afb-6edbf07fe087",
"cardArtId": "556e4478-a80d-d443-aa78-c11ad19c8d39",
"templateId": "cddf4ba9-747c-aee9-5373-6d985cbfb198",
"enabled": true,
"name": "Trigger When Number Field Zero",
"description": null,
"operator": "eq",
"value": 0,
"annual": false,
"bindings": {
"date": {
"binding": "birthday",
"format": null
},
"name": {
"binding": "firstName",
"format": null
},
"years_as_a_customer": {
"binding": "customer_years",
"format": null
}
}
}
],
"validation": {
"pending": 0,
"requireAction": 0,
"validated": 0
}
}
Contact List Listing
Retrieve active contact lists for your organisation.
-
resultsarray
-
A paginated array of zero or more
Contact List
objects.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 8,
"limit": 25,
"offset": 0,
"totalRecords": 8
},
"results": [
{
"id": "8b6638fc-8d9e-bf53-ac68-2b64030b459a",
"name": "Contact List #1",
"description": null,
"status": "active",
"contacts": 0,
"automations": 0,
"fields": [],
"rules": [],
"validation": {
"pending": 0,
"requireAction": 0,
"validated": 0
}
},
{
"id": "be07acfd-ab65-2818-83e4-9c0c88da6653",
"name": "Contact List #2",
"description": "",
"status": "active",
"contacts": 0,
"automations": 2,
"fields": [
{
"id": "bba982f4-66ba-4107-edcb-df523b0c2a89",
"code": "birthday",
"name": "Birthday",
"description": null,
"type": "date",
"status": "active"
},
{
"id": "6b5d32bc-17f3-11eb-8853-04d4c4254e1b",
"code": "completionDate",
"name": "Completion Date",
"description": null,
"type": "date",
"status": "active"
},
{
"id": "37db15aa-7e76-73c7-89e5-00b56a9c2525",
"code": "numericField",
"name": "Numeric Field",
"description": null,
"type": "number",
"status": "active"
},
{
"id": "8f45b894-dd24-1139-7292-5b18d5ba23b1",
"code": "testField",
"name": "Test Field",
"description": null,
"type": "text",
"status": "active"
}
],
"rules": [
{
"id": "15375e7e-0709-79bc-0db5-f18de014935a",
"fieldId": "bba982f4-66ba-4107-edcb-df523b0c2a89",
"cardArtId": "8fc7bf89-03d1-3d55-9d9e-f3d615c5bb34",
"templateId": "a8288cf8-689f-4dc3-2fd0-6f6f9c86ecbd",
"enabled": false,
"name": "Rule #1",
"description": null,
"operator": "db",
"value": 30,
"annual": false,
"bindings": {
"name": {
"binding": "firstName",
"format": null
},
"variable": {
"binding": "fullName",
"format": null
}
}
},
{
"id": "45702de2-dee0-2b14-ed52-ae63886f28f1",
"fieldId": "37db15aa-7e76-73c7-89e5-00b56a9c2525",
"cardArtId": "556e4478-a80d-d443-aa78-c11ad19c8d39",
"templateId": "cddf4ba9-747c-aee9-5373-6d985cbfb198",
"enabled": true,
"name": "Rule #2",
"description": null,
"operator": "eq",
"value": 0,
"annual": false,
"bindings": {
"date": {
"binding": "birthday",
"format": null
},
"name": {
"binding": "firstName",
"format": null
},
"years_as_a_customer": {
"binding": "customer_years",
"format": null
}
}
}
],
"validation": {
"pending": 0,
"requireAction": 0,
"validated": 0
}
},
...
]
}
}
Get Contact List
Retrieve information on a specific contact list.
-
(Data Body)Contact List Object
-
A contact list object representing the requested information.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"id": "6d7c260b-f39f-e822-6aa5-612014047d20",
"name": "Test Contact List",
"description": null,
"status": "active",
"contacts": 0,
"automations": 0,
"fields": [
{
"id": "9da307a4-1c37-f69a-c6ec-1ba002165d57",
"code": "dateField",
"name": "Date Field",
"description": null,
"type": "date",
"status": "active"
},
{
"id": "b9763d1b-e0fd-77a3-7afb-6edbf07fe087",
"code": "numberField",
"name": "Number Field",
"description": null,
"type": "number",
"status": "active"
},
{
"id": "17ac0886-87d5-e098-337e-6081a1fa969e",
"code": "textField",
"name": "Text Field",
"description": null,
"type": "text",
"status": "active"
}
],
"rules": [],
"validation": {
"pending": 0,
"requireAction": 0,
"validated": 0
}
},
"testMode": true
}
Add Contact List
Add a new contact list, optionally with custom fields.
-
namestring
-
A short description for this contact list to allow it to be identified.
-
descriptionstring
-
A free-text description of this list to store whatever additional information might be necesssary.
-
fieldsarray
-
Additional custom fields to add to this list, if required.
-
fields[].namestring
-
A short name for this field, which will be used to create a unique field identifier.
-
fields[].typestring
-
The type of data this field models, one of
text
,date
,number
orurl
. -
fields[].descriptionstring
-
A longer description of this field, if required.
-
(Data Body)Contact List Object
-
The contact list object representing the list that was just created. Use the ID property from this to feed into further requests as needed.
{
"name": "Employee Birthdays",
"description": "Current employee birthdays for all staff.",
"fields": [
{"name": "Birthday", "type": "date"},
{"name": "Preferred Name", "type": "text", "description": "The customer's preferred name when we address them."}
]
}
{
"state": {
"status": "OK",
"messages": [],
"version": "1418"
},
"data": {
"id": "2862abe8-a299-30f2-6324-bd891e687f0d",
"name": "Employee Birthdays",
"description": "Current employee birthdays for all staff.",
"status": "active",
"contacts": 0,
"automations": 0,
"fields": [
{
"id": "30f2abe8-a299-30f2-6324-bd891e687f0d",
"code": "birthday",
"name": "Birthday",
"description": null,
"type": "date",
"status": "active"
},
{
"id": "a299abe8-a299-30f2-6324-bd891e687f0d",
"code": "preferredName",
"name": "Preferred Name",
"description": "The customer's preferred name when we address them.",
"type": "text",
"status": "active"
}
],
"rules": [],
"validation": {
"pending": 0,
"requireAction": 0,
"validated": 0
}
}
}
Edit Contact List
Add a new contact list, optionally with custom fields.
-
namestring
-
A short description for this contact list to allow it to be identified.
-
descriptionstring
-
A free-text description of this list to store whatever additional information might be necesssary.
-
fieldsarray
-
Additional custom fields to add or remove from this list, if required. If existing fields are specifed, these fields will be updated or removed as required, otherwise fields will remain unchanged.
-
fields[].idstring
-
The identifier of an existing field to update.
-
fields[].namestring
-
A short name for this field, which will be used to create a unique field identifier.
Optional if removing a field.
-
fields[].typestring
-
The type of data this field models, one of
text
,date
,number
orurl
.Optional if removing a field.
Ignored if updating an existing field. -
fields[].descriptionstring
-
A longer description of this field, if required.
-
fields[].removeboolean
-
If set to true, removes this field from the list.
-
(Data Body)Contact List Object
-
The contact list object representing the list that was updated.
{
"name": "Employee Birthdays",
"description": "Current employee birthdays for all staff.",
"fields": [
{"name": "Birthday", "type": "date"},
{"name": "Preferred Name", "type": "text", "description": "The customer's preferred name when we address them."}
]
}
{
"state": {
"status": "OK",
"messages": [],
"version": "1418"
},
"data": {
"id": "2862abe8-a299-30f2-6324-bd891e687f0d",
"name": "Employee Birthdays",
"description": "Current employee birthdays for all staff.",
"status": "active",
"contacts": 0,
"automations": 0,
"fields": [
{
"id": "30f2abe8-a299-30f2-6324-bd891e687f0d",
"code": "birthday",
"name": "Birthday",
"description": null,
"type": "date",
"status": "active"
},
{
"id": "a299abe8-a299-30f2-6324-bd891e687f0d",
"code": "preferredName",
"name": "Preferred Name",
"description": "The customer's preferred name when we address them.",
"type": "text",
"status": "active"
}
],
"rules": [],
"validation": {
"pending": 0,
"requireAction": 0,
"validated": 0
}
}
}
Delete Contact List
Delete a contact list, disabling any automations linked to it.
-
(Data Body)Contact List Object
-
The contact list object representing the list that was deleted.
(No body required)
{
"state": {
"status": "OK",
"messages": [],
"version": "1418"
},
"data": {
"id": "2862abe8-a299-30f2-6324-bd891e687f0d",
"name": "Employee Birthdays",
"description": "Current employee birthdays for all staff.",
"status": "deleted",
"contacts": 0,
"automations": 0,
"fields": [
{
"id": "30f2abe8-a299-30f2-6324-bd891e687f0d",
"code": "birthday",
"name": "Birthday",
"description": null,
"type": "date",
"status": "active"
},
{
"id": "a299abe8-a299-30f2-6324-bd891e687f0d",
"code": "preferredName",
"name": "Preferred Name",
"description": "The customer's preferred name when we address them.",
"type": "text",
"status": "active"
}
],
"rules": [],
"validation": {
"pending": 0,
"requireAction": 0,
"validated": 0
}
}
}
Contacts
The contact
endpoints provide the ability to create, manipulate and interrogate records of users, employees and other contacts.
/v2/contact-lists/{listId}/contacts
/v2/contact-lists/{listId}/contacts
/v2/contact-lists/{listId}/contacts/find
/v2/contact-lists/{listId}/contacts/{id}
/v2/contact-lists/{listId}/contacts/{id}
/v2/contact-lists/{listId}/contacts/sync
/v2/contact-lists/{listId}/contacts/delete
Contact Object
The contact object provides detail on a given record within a contact list. This contains their addressing information, unique identifiers (email, external ID where supplied) and any additional custom field data you may have supplied for the list.
-
idUUID
-
Unique identifier for this contact.
-
externalIdstring
-
Any external identifier you have supplied for this contact which can be used to update this contact in future calls.
-
contactListIdstring
-
Identifier for the contact list this contact belongs to.
-
statusstring
-
Current state of this contact.
-
firstNamestring
-
The first name of a contact
-
lastNamestring
-
The last name of a contact, if supplied
-
fullNamestring
-
The contact's full name, a combination of firstName & lastName.
-
emailstring
-
An email address for this contact, if supplied, which can be used to uniquely identify this contact for subsequent actions.
-
companystring
-
The company a contact belongs to, if supplied.
-
addressstring
-
The primary address line.
-
address2string
-
A secondary address line, typically containing a unit, apartment, suite number etc.
-
localitystring
-
A suburb or city for the contact.
-
adminAreaLevel1string
-
The state or province for this address.
-
countrystring
-
A 2-character ISO code identifying the contact's country.
-
postcodestring
-
A postal code or ZIP code for this contact, where required by local addressing formats.
-
latitudelongitudefloat
-
Geo coordinates for this address, if it has been resolved with address lookups.
-
rawAddressstring
-
If a full, raw address was supplied for this contact, the original address as supplied by my spreadsheet upload or application.
-
requiresActionboolean
-
If this contact was subject to address validation, whether this record requires manual intervention to resolve.
-
fieldsobject
-
Additional custom fields based on field codes for extended data on this contact record.
{
"id": "23fb4b1c-f127-eeea-9f68-6f0a7945da43",
"externalId": "thor1234",
"contactListId": "b905e966-ecdf-9656-2564-049c334a4db3",
"status": "active",
"firstName": "Thor",
"lastName": "Odinson",
"fullName": "Thor Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"address2": null,
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": 12345,
"latitude": null,
"longitude": null,
"rawAddress": null,
"requiresAction": false,
"fields": {
"dateField": "1052-04-01",
"urlField": "https://www.avengers.com/profile/thor"
}
}
Contact Listing
Retrieve active contacts in a given list.
-
resultsarray
-
A paginated array of zero or more
Contact
objects.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 25,
"limit": 25,
"offset": 0,
"totalRecords": 851
},
"results": [
{
"id": "23fb4b1c-f127-eeea-9f68-6f0a7945da43",
"externalId": "thor1234",
"contactListId": "b905e966-ecdf-9656-2564-049c334a4db3",
"status": "active",
"firstName": "Thor",
"lastName": "Odinson",
"fullName": "Thor Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"address2": null,
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": 12345,
"latitude": null,
"longitude": null,
"rawAddress": null,
"requiresAction": false,
"fields": {
"dateField": "1052-04-01",
"urlField": "https://www.avengers.com/profile/thor"
}
},
...
]
}
}
Get Contact
Retrieve information on a specific contact from a given list, identified by Cardly's unique identifier for the record.
-
(Data Body)Contact Object
-
A contact object representing the requested information.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"id": "23fb4b1c-f127-eeea-9f68-6f0a7945da43",
"externalId": "thor1234",
"contactListId": "b905e966-ecdf-9656-2564-049c334a4db3",
"status": "active",
"firstName": "Thor",
"lastName": "Odinson",
"fullName": "Thor Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"address2": null,
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": 12345,
"latitude": null,
"longitude": null,
"rawAddress": null,
"requiresAction": false,
"fields": {
"dateField": "1052-04-01",
"urlField": "https://www.avengers.com/profile/thor"
}
}
}
Find Contact
Retrieve information on a specific contact from a given list, searching for the contact by an email address or previously supplied external identifier.
-
querystring
-
An email address or external identifier to locate a contact by within the given list.
-
(Data Body)Contact Object
-
A contact object representing the requested information.
?query=thor@avengers.com
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"id": "23fb4b1c-f127-eeea-9f68-6f0a7945da43",
"externalId": "thor1234",
"contactListId": "b905e966-ecdf-9656-2564-049c334a4db3",
"status": "active",
"firstName": "Thor",
"lastName": "Odinson",
"fullName": "Thor Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"address2": null,
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": 12345,
"latitude": null,
"longitude": null,
"rawAddress": null,
"requiresAction": false,
"fields": {
"dateField": "1052-04-01",
"urlField": "https://www.avengers.com/profile/thor"
}
}
}
Add Contact
Add a new contact to a given list.
Please note: contacts added via API calls will be checked for uniqueness based on your externalId and email fields, if supplied. If a contact already exists for one of these fields the addition operation will be rejected.
-
externalIdstring
-
Any external identifier you have supplied for this contact which can be used to update this contact in future calls.
-
firstNamestring
-
The first name of a contact
-
lastNamestring
-
The last name of a contact, if supplied
-
emailstring
-
An email address for this contact, if supplied, which can be used to uniquely identify this contact for subsequent actions.
-
companystring
-
The company a contact belongs to, if supplied.
-
addressstring
-
The primary address line.
-
address2string
-
A secondary address line, typically containing a unit, apartment, suite number etc.
-
localitystring
-
A suburb or city for the contact.
-
regionstring
-
The state or province for this address. Conditionally required based on the country supplied.
-
countrystring
-
A 2-character ISO code identifying the contact's country.
-
postcodestring
-
A postal code or ZIP code for this contact, where required by local addressing formats. Conditionally required based on the country supplied.
-
fieldsobject
-
Additional custom fields based on field codes for extended data on this contact record.
-
fields[fieldId]string
-
For each custom field in your list, fields may be specified based on the unique field ID created by Cardly.
Fields will be subject to data type checking where appropriate:
- URL Fields require full, complete URLs supplied, if used.
- Number Fields require any numeric string, free of any human readable formatting (ie, commas for thousands separators).
-
(Data Body)Contact Object
-
An object representing the contact that was just created. Use the ID property from this to feed into further requests as needed.
{
"externalId": "thor1234",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": "12345",
"fields": {
"e7000b81-332e-612f-6098-8ff8af04f1bb": "1052-04-01",
"6098b81-332e-612f-e7000-8ff8af04f1bb": "https://www.avengers.com/profile/thor"
}
}
{
"state": {
"status": "OK",
"messages": [],
"version": "1418"
},
"data": {
"id": "23fb4b1c-f127-eeea-9f68-6f0a7945da43",
"externalId": "thor1234",
"contactListId": "b905e966-ecdf-9656-2564-049c334a4db3",
"status": "active",
"firstName": "Thor",
"lastName": "Odinson",
"fullName": "Thor Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"address2": null,
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": 12345,
"latitude": null,
"longitude": null,
"rawAddress": null,
"requiresAction": false,
"fields": {
"dateField": "1052-04-01",
"urlField": "https://www.avengers.com/profile/thor"
}
}
}
Edit Contact
Edit an existing contact, providing updated information for the contact record.
-
externalIdstring
-
Any external identifier you have supplied for this contact which can be used to update this contact in future calls.
-
firstNamestring
-
The first name of a contact
-
lastNamestring
-
The last name of a contact, if supplied
-
emailstring
-
An email address for this contact, if supplied, which can be used to uniquely identify this contact for subsequent actions.
-
companystring
-
The company a contact belongs to, if supplied.
-
addressstring
-
The primary address line.
-
address2string
-
A secondary address line, typically containing a unit, apartment, suite number etc.
-
localitystring
-
A suburb or city for the contact.
-
regionstring
-
The state or province for this address. Conditionally required based on the country supplied.
-
countrystring
-
A 2-character ISO code identifying the contact's country.
-
postcodestring
-
A postal code or ZIP code for this contact, where required by local addressing formats. Conditionally required based on the country supplied.
-
fieldsobject
-
Additional custom fields based on field codes for extended data on this contact record.
-
fields[fieldId]string
-
For each custom field in your list, fields may be specified based on the unique field ID created by Cardly.
Fields will be subject to data type checking where appropriate:
- URL Fields require full, complete URLs supplied, if used.
- Number Fields require any numeric string, free of any human readable formatting (ie, commas for thousands separators).
-
(Data Body)Contact Object
-
An object representing the contact that was just updated.
{
"externalId": "thor1234",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": "12345",
"fields": {
"e7000b81-332e-612f-6098-8ff8af04f1bb": "1052-04-01",
"6098b81-332e-612f-e7000-8ff8af04f1bb": "https://www.avengers.com/profile/thor"
}
}
{
"state": {
"status": "OK",
"messages": [],
"version": "1418"
},
"data": {
"id": "23fb4b1c-f127-eeea-9f68-6f0a7945da43",
"externalId": "thor1234",
"contactListId": "b905e966-ecdf-9656-2564-049c334a4db3",
"status": "active",
"firstName": "Thor",
"lastName": "Odinson",
"fullName": "Thor Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"address2": null,
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": 12345,
"latitude": null,
"longitude": null,
"rawAddress": null,
"requiresAction": false,
"fields": {
"dateField": "1052-04-01",
"urlField": "https://www.avengers.com/profile/thor"
}
}
}
Sync Contact
Sync a contact based on a provided ID, external ID or email address. If a matching contact does not exist, a new one is created, otherwise existing contact records are updated. Previously removed contacts will be reactivated if they match provided details.
Contact matching is performed in order of matching Cardly ID, external ID or email address. At least one of these details must be provided, and the first matching contact (if found) is used for update operations.
-
externalIdstring
-
Any external identifier you have supplied for this contact which can be used to update this contact in future calls, or identify this contact in this call.
-
firstNamestring
-
The first name of a contact
-
lastNamestring
-
The last name of a contact, if supplied
-
emailstring
-
An email address for this contact, if supplied, which can be used to uniquely identify this contact for subsequent actions, or identify this contact in this call.
-
companystring
-
The company a contact belongs to, if supplied.
-
addressstring
-
The primary address line.
-
address2string
-
A secondary address line, typically containing a unit, apartment, suite number etc.
-
localitystring
-
A suburb or city for the contact.
-
regionstring
-
The state or province for this address. Conditionally required based on the country supplied.
-
countrystring
-
A 2-character ISO code identifying the contact's country.
-
postcodestring
-
A postal code or ZIP code for this contact, where required by local addressing formats. Conditionally required based on the country supplied.
-
fieldsobject
-
Additional custom fields based on field codes for extended data on this contact record.
-
fields[fieldId]string
-
For each custom field in your list, fields may be specified based on the unique field ID created by Cardly.
Fields will be subject to data type checking where appropriate:
- URL Fields require full, complete URLs supplied, if used.
- Number Fields require any numeric string, free of any human readable formatting (ie, commas for thousands separators).
-
(Data Body)Contact Object
-
An object representing the contact that was just updated.
{
"externalId": "thor1234",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": "12345",
"fields": {
"e7000b81-332e-612f-6098-8ff8af04f1bb": "1052-04-01",
"6098b81-332e-612f-e7000-8ff8af04f1bb": "https://www.avengers.com/profile/thor"
}
}
{
"state": {
"status": "OK",
"messages": [],
"version": "1418"
},
"data": {
"id": "23fb4b1c-f127-eeea-9f68-6f0a7945da43",
"externalId": "thor1234",
"contactListId": "b905e966-ecdf-9656-2564-049c334a4db3",
"status": "active",
"firstName": "Thor",
"lastName": "Odinson",
"fullName": "Thor Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"address2": null,
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": 12345,
"latitude": null,
"longitude": null,
"rawAddress": null,
"requiresAction": false,
"fields": {
"dateField": "1052-04-01",
"urlField": "https://www.avengers.com/profile/thor"
}
}
}
Delete Contact
Delete a contact, disabling any automations linked to it.
Contact matching is performed in order of matching Cardly ID, external ID or email address. At least one of these details must be provided.
-
externalIdstring
-
Any external identifier to identify the contact to delete with, if no email address or Cardly ID is supplied.
-
emailstring
-
An email address to identify the contact to delete with, if no external ID or Cardly ID is supplied.
-
(Data Body)Contact Object
-
The contact object representing the contact that was deleted.
{
"externalId": "thor1234",
"email": "thor@avengers.com"
}
{
"state": {
"status": "OK",
"messages": [],
"version": "1418"
},
"data": {
"id": "23fb4b1c-f127-eeea-9f68-6f0a7945da43",
"externalId": "thor1234",
"contactListId": "b905e966-ecdf-9656-2564-049c334a4db3",
"status": "deleted",
"firstName": "Thor",
"lastName": "Odinson",
"fullName": "Thor Odinson",
"email": "thor@avengers.com",
"company": "Avengers Inc.",
"address": "1 Main Street",
"address2": null,
"locality": "Brooklyn",
"adminAreaLevel1": "NY",
"country": "US",
"postcode": 12345,
"latitude": null,
"longitude": null,
"rawAddress": null,
"requiresAction": false,
"fields": {
"dateField": "1052-04-01",
"urlField": "https://www.avengers.com/profile/thor"
}
}
}
Orders
The orders
endpoints provide the ability to generate on-the-fly previews with supplied card data, lodge live orders and query your organisation's order history.
Please note: Once lodged with a live API key, orders are typically difficult to cancel reliably due to our printer partner's schedules. If you have lodged an order in error, please immediately contact the Cardly support team so we can attempt to intervene on your behalf. However, Cardly is unable to make any guarantee on how successful cancelling an order that has gone to print will be.
/v2/orders
/v2/orders/{id}
/v2/orders/preview
/v2/orders/place
Order Object
The order object provides detail on a given order on your account, along with individual line item recipient, sender, cost and timing details.
-
idUUID
-
Unique identifier for this order.
-
statusstring
-
The current status of this order.
-
originstring
-
Where the order originate - via the API, your organisation portal, etc.
-
customerobject
-
Details about the organisation or user that placed this order. For API-originating orders, this will be your organisation details.
-
costs.creditsfloat
-
The total credits this order consumed, if paid by credits.
-
costs.giftCreditfloat
-
The total gift credits this order consumed, if paid by credits.
-
costs.grossfloat
-
The gross cost of this order, exclusive of tax.
-
costs.discountfloat
-
The discount amount for this order overall.
-
costs.taxfloat
-
The total amount of tax on this order, exclusive of shipping.
-
costs.shippingfloat
-
The total tax-exclusive cost of shipping for this order.
-
costs.shippingTaxfloat
-
The total amount of tax applied to shipping.
-
costs.totalfloat
-
The total cost of this order.
-
costs.currencystring
-
The currency this order was priced in.
-
timings.paiddatetime
-
When this order was paid - if it is paid.
-
timings.createddatetime
-
When this order was first raised.
-
timings.updateddatetime
-
When this order was last updated.
-
itemsarray
-
List of
Order Item
objects that comprise this order.
{
"id": "c988c0c0-f6a3-4e90-bbd5-759497a82607",
"status": "paid",
"origin": "api",
"description": null,
"customer": {
"firstName": "Cardly Pty Ltd",
"lastName": null,
"address": "10 Another Lane",
"address2": null,
"city": "Brisbane",
"region": "QLD",
"postcode": "4000",
"country": "AU"
},
"costs": {
"credits": 0.53,
"giftCredit": 50
},
"timings": {
"paid": "2019-12-04 12:06:46",
"created": "2019-12-04 12:06:46",
"updated": "2019-12-04 12:06:46"
},
"items": [
{
"id": "60051a2c-86af-45bb-a34f-febf37d9070c",
"type": "card",
"label": "Cardly - Happy Birthday",
"quantity": 1,
"costs": {
"credits": 0.5,
"giftCredit": 0
},
"shipTo": "S",
"shipMethod": "standard",
"scheduledDate": "2019-12-25 00:00:00",
"recipient": {
"address": "10 Somewhere Place",
"address2": "",
"city": "Fairyland",
"region": "QLD",
"postcode": "4110",
"country": "AU"
},
"sender": {
"name": "Cardly",
"address": "10 Another Lane",
"address2": null,
"city": "Brisbane",
"region": "QLD",
"postcode": "4000",
"country": "AU",
"omitAddress": false
},
"timings": {
"lodgeAfter": "2019-12-04 12:06:46",
"shipped": null,
"lodged": null,
"held": null
},
"delivery": {
"requested": "2019-12-25",
"dispatch": "2019-12-12",
"estimatedMinArrival": "2019-12-17",
"estimatedMaxArrival": "2019-12-20"
},
"media": 3,
"artwork": "5c40d96b-b7c3-4980-9bdc-14306104ebd4",
"template": "73bf3d63-5bca-45dc-86f6-d5c01946d78b",
"related": [
{
"id": "3ae265f0-0f63-4018-a0a1-c26d31a3179f",
"type": "envelope",
"label": "Additional envelope",
"quantity": 1,
"costs": {
"credits": 0.03,
"giftCredit": 0
},
"related": []
},
{
"id": "51897b27-81d6-e82b-dcfe-36f748d516e9",
"type": "gift-card",
"label": "Gift Card: Amazon Gift Card Card for $50",
"quantity": 1,
"costs": {
"credits": 0,
"giftCredit": 50
},
"related": []
}
]
}
]
}
Order Item Object
The order item object provides detail on a component of a larger order, along with detail related to add-on components to this item (ie, gift cards, additional envelopes).
-
idUUID
-
Unique identifier for this order item.
-
typestring
-
The type of item this is - typically
card
. -
labelstring
-
A description of this item, typically the card artwork title.
-
quantityinteger
-
The number of units of this item that were ordered.
-
costs.creditsfloat
-
The total credits this order consumed, if paid by credits.
-
costs.grossfloat
-
The gross unit cost of this item, exclusive of tax.
-
costs.discountfloat
-
The discount amount per unit for this item.
-
costs.taxfloat
-
The amount of tax per unit on this item, exclusive of shipping.
-
costs.shippingfloat
-
The per-unit tax-exclusive cost of shipping for this item.
-
costs.shippingTaxfloat
-
The amount per unit of tax applied to shipping.
-
costs.totalfloat
-
The total line cost for the entire quantity requested of this item.
-
costs.currencystring
-
The currency this item was priced in.
-
shipTostring
-
Either
S
for shipping back to the sender, orD
for shipping direct to the customer. -
shipMethodstring
-
The shipping method used, either
standard
,priority
orexpress
. -
scheduledDatedate
-
If requested at order time, the date this item was requested to arrive by.
-
recipientobject
-
The address details for the recipient of this item.
-
senderobject
-
The address details for the sender of this item.
-
timings.lodgeAfterdatetime
-
The scheduled time for sending this item to print. Lodgement will always occur after this time.
-
timings.lodgeddatetime
-
When this item was sent to print.
-
timings.shippeddatetime
-
When this item was shipped. Please note: we rely on external data to populate this and it may not always be immediately available.
-
timings.helddatetime
-
If this item is being held, the time the item was marked for holding.
-
delivery.requesteddate
-
The arrival date requested, if applicable. This will be null where you did not specify a requested delivery date.
-
delivery.dispatchdate
-
The date an order will be sent to print, either today if no requested delivery date is specified, or a date calculated from the maximum delivery window time for your selected shipping method.
-
delivery.estimatedMinArrivaldate
-
The estimated earliest date an order should be received. Note that this is subject to end postal carriers and beyond the control of Cardly directly.
-
delivery.estimatedMaxArrivaldate
-
The estimated latest date an order should be received. Note that this is subject to end postal carriers and beyond the control of Cardly directly.
-
mediainteger
-
Identifier for the media type used for this item.
-
artworkUUID
-
Identifier for the artwork used for this item.
-
templateUUID
-
Identifier for the template used to populate this item, if applicable.
-
relatedarray
-
Zero or more
Order Item
objects directly related to this one - additional envelopes, gift cards, etc. -
tracking.carrierstring
-
The name of the carrier for orders with tracking.
-
tracking.codestring
-
The tracking code provided by the carrier for a given consignment.
-
tracking.linkstring
-
Carrier's URL where applicable to view tracking information for this consignment.
{
"id": "60051a2c-86af-45bb-a34f-febf37d9070c",
"type": "card",
"label": "Cardly - Happy Birthday",
"quantity": 1,
"costs": {
"credits": 0.5,
"giftCredit": 50
},
"shipTo": "S",
"shipMethod": "standard",
"scheduledDate": "2019-12-25",
"recipient": {
"address": "10 Somewhere Place",
"address2": "",
"city": "Fairyland",
"region": "QLD",
"postcode": "4110",
"country": "AU"
},
"sender": {
"name": "Cardly",
"address": "10 Another Lane",
"address2": null,
"city": "Brisbane",
"region": "QLD",
"postcode": "4000",
"country": "AU",
"omitAddress": false
},
"timings": {
"lodgeAfter": "2019-12-04 12:06:46",
"shipped": null,
"lodged": null,
"held": null
},
"delivery": {
"requested": "2019-12-25",
"dispatch": "2019-12-12",
"estimatedMinArrival": "2019-12-17",
"estimatedMaxArrival": "2019-12-20"
},
"media": 3,
"artwork": "5c40d96b-b7c3-4980-9bdc-14306104ebd4",
"template": "73bf3d63-5bca-45dc-86f6-d5c01946d78b",
"related": [
{
"id": "3ae265f0-0f63-4018-a0a1-c26d31a3179f",
"type": "envelope",
"label": "Additional envelope",
"quantity": 1,
"costs": {
"credits": 0.03,
"giftCredit": 0
},
"related": []
},
{
"id": "51897b27-81d6-e82b-dcfe-36f748d516e9",
"type": "gift-card",
"label": "Gift Card: Amazon Gift Card Card for $50",
"quantity": 1,
"costs": {
"credits": 0,
"giftCredit": 50
},
"related": []
}
]
}
Order Listing
Retrieve orders placed by your organisation.
-
resultsarray
-
A paginated array of zero or more
Order
objects.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 5,
"limit": 25,
"offset": 0,
"totalRecords": 5
},
"results": [
{
"id": "cdb75194-c03b-1bab-e390-47853b1dba08",
"status": "Paid",
"origin": "api",
"description": null,
"customer": {
"firstName": "John",
"lastName": "Doe",
"address": "10 Somewhere Place",
"address2": null,
"city": "Fairyland",
"region": "QLD",
"country": "AU",
"postcode": "4110",
"email": "someone@somewhere.com",
"purchaseOrderNo": null,
"notes": null
},
"costs": {
"credits": 1.0
},
"timings": {
"paid": "2019-12-17 15:03:57",
"created": "2019-12-17 15:03:56",
"updated": "2019-12-17 15:03:57"
},
"items": [
{
"id": "5651b520-5565-9a55-0045-c20ca338b114",
"type": "card",
"label": "Test Artwork",
"quantity": 1,
"costs": {
"credits": 1.0
},
...
}
]
},
...
]
}
}
Get Order
Retrieve information on a specific order.
-
(Data Body)Order Object
-
An order object representing the requested order information.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"id": "cdb75194-c03b-1bab-e390-47853b1dba08",
"status": "Paid",
"origin": "api",
"description": null,
"customer": {
"firstName": "John",
"lastName": "Doe",
"address": "10 Somewhere Place",
"address2": null,
"city": "Fairyland",
"region": "QLD",
"country": "AU",
"postcode": "4110",
"email": "someone@somewhere.com",
"purchaseOrderNo": null,
"notes": null
},
"costs": {
"credits": 1.0
},
"timings": {
"paid": "2019-12-17 15:03:57",
"created": "2019-12-17 15:03:56",
"updated": "2019-12-17 15:03:57"
},
"items": [
{
"id": "5651b520-5565-9a55-0045-c20ca338b114",
"type": "card",
"label": "Test Artwork",
"quantity": 1,
"costs": {
"credits": 1.0
},
"shipTo": "D",
"shipMethod": "express",
"scheduledDate": null,
"recipient": {
"name": "Jane Doe",
"address": "20 Somewhere Drive",
"address2": null,
"city": "Fairyland",
"region": "",
"country": "AU",
"postcode": "4110"
},
"sender": {
"name": "John Doe",
"address": "10 Somewhere Place",
"address2": null,
"city": "Fairyland",
"region": "QLD",
"country": "AU",
"postcode": "4110"
},
"timings": {
"lodgeAfter": "2019-12-17 15:03:56",
"shipped": null,
"lodged": null,
"held": null
},
"delivery": {
"requested": null,
"dispatch": "2019-12-17",
"estimatedMinArrival": "2019-12-20",
"estimatedMaxArrival": "2019-12-30"
},
"media": "1708fe20-ad4e-11ea-9da9-04d4c4254e1b",
"artwork": "b6623a6c-36c7-af45-e0d9-c90d6e0f0333",
"template": "19ecf6e6-d2e2-59cb-bce0-fa980241db73",
"related": [],
"tracking": {
"carrier": "Australia Post",
"code": "123456789",
"link": "https://auspost.com.au/mypost/track/#/details/123456789"
}
}
]
}
}
Generate Preview
The preview
endpoint allows you to generate a quick, low-quality, watermarked preview document for a given piece of card art and template, along with passed user data. You will also be provided with delivery window estimates and a projected credit cost for the order based on your passed data.
This call is intentionally nearly identical to the Place Order
function to facilitate testing and a quick migration to ordering. The main difference between these calls is a Place Order
request permits multiple line items with differing data and settings, while the Generate Preview
deals with only a single card at a time.
-
artworkstring
-
The unique artwork ID to use for this card. This may be the UUID or slug for a given piece of artwork under your organisation.
-
templatestring
-
The template ID to use top populate this card. If no template is specified, only the main text panels on the card will be utilised and no variable substitutions will occur.
-
styleStyle Object
-
Styles to apply to act as defaults for the whole card. This does not need to define all style object elements, only those you wish to override from a used template or default styles.
Please note: If you have specified a template, the
style
element will override any properties the template has set as defaults. -
messages.pages[].pageinteger
-
Numeric identifier for the page the rest of this element's settings apply to. This is a one-based numbering of card pages - front cover is 1, inside left is 2, etc.
-
messages.pages[].styleStyle Object
-
Styles to apply to the main text block on this page. This does not need to define all style object elements, only those you wish to override from a used template or default styles.
Please note: If you have specified a template, the
style
element will override any properties the template has set for this page. Currently, onlyalign
andverticalAlign
properties have an effect at a page level. -
messages.pages[].textstring
-
The main panel text to use for a given page. Note that this will only be utilised if the media supports placing text on this page. Most four page cards will restrict front/back panels to artwork only, while postcards typically accept only content for the back panel.
Please note: If you have specified a template, the
messages
element will be ignored entirely in favor of the template's text. -
variables[].(property)string
-
Zero or more variables to inject into a template, based on the variables supported by that template. This is a key => value mapped object based on the variables to use in the template.
-
recipient.firstNamestring
-
The recipient's first name, as it should appear on the envelope.
-
recipient.lastNamestring
-
The recipient's last name, as it should appear on the envelope.
-
recipient.companystring
-
The recipient's company, if required, as it should appear below their name on the envelope.
-
recipient.addressstring
-
The recipient's street number, name and type, ie. 10 Somewhere Lane
-
recipient.address2string
-
Unit, floor, apartment etc. additional information for the recipient's address.
-
recipient.citystring
-
Suburb or city for the recipient.
-
recipient.regionstring
-
State / province / region for the recipient, if required. UK and NZ currently do not require a region specified.
-
recipient.postcodestring
-
Postcode for the recipient.
-
recipient.countrystring
-
2-character ISO code for the country to ship to.
-
sender.firstNamestring
-
The sender's first name, as it should appear on the envelope.
Please note: the entire sender section is optional and will default to your organisation's return details if not completed. If any sender element is specified, all must be specified.
-
sender.lastNamestring
-
The sender's last name, as it should appear on the envelope.
-
sender.addressstring
-
The sender's street number, name and type, ie. 10 Somewhere Lane
-
sender.address2string
-
Unit, floor, apartment etc. additional information for the sender's address.
-
sender.citystring
-
Suburb or city for the sender.
-
sender.regionstring
-
State / province / region for the sender, if required. UK and NZ currently do not require a region specified.
-
sender.postcodestring
-
Postcode for the sender.
-
sender.countrystring
-
2-character ISO code for the country to use for the return address..
-
sender.omitAddressboolean
-
If true, the sender's address will not appear on envelopes.
-
shippingMethodstring
-
The shipping method to use. Note that shipping method support is on a per-region basis, but all regions will at minimum support the
standard
shipping method.Currently, only Australia supports the additional
priority
shipping method. -
shipToMeboolean
-
If set to
true
, denotes that the recipient of this card is also the sender and to include an additional, blank envelope. Note that this incurs a small additional credit cost. -
requestedArrivaldate
-
A future requested arrival date for this card. In a preview request, this will provide a basis for shipping window estimates to be returned. If not specified, immediate dispatch is assumed and dates will be calculated based on the current date.
-
purchaseOrderNumberstring
-
A purchase order or other identifier to store against the order. Note that this has no bearing on a preview, unless there is an template variable that accepts this value.
-
balancefloat
-
Your organisation's current credit balance. Note that this may not be a whole number.
-
giftCreditobject
-
Your organisation's current gift credit balance.
-
order.creditCostfloat
-
The number of credits this order costs based on the selected media size, post option and any additional options such as 'send to me' requiring additional envelopes.
-
order.giftCreditCostfloat
-
The amount of gift credit this order costs based on any included gifts.
-
order.delivery.requesteddate
-
The arrival date requested, if applicable. This will be null where you did not specify a requested delivery date.
-
order.delivery.dispatchdate
-
The date an order will be sent to print, either today if no requested delivery date is specified, or a date calculated from the maximum delivery window time for your selected shipping method.
-
order.delivery.estimatedMinArrivaldate
-
The estimated earliest date an order should be received. Note that this is subject to end postal carriers and beyond the control of Cardly directly.
-
order.delivery.estimatedMaxArrivaldate
-
The estimated latest date an order should be received. Note that this is subject to end postal carriers and beyond the control of Cardly directly.
-
preview.expiresdatetime
-
Timestamp of when this preview will be removed from Cardly's systems. Ensure the preview URLs are accessed prior to this time.
-
preview.formatstring
-
The file format for the preview. Currently only
PDF
previews are generated. -
preview.urls.formatstring
-
URL to the card artwork preview document. This URL does not require authentication and can be retrieved with a standard
GET
request. -
preview.urls.envelopestring
-
URL to the envelope artwork preview, if applicable. Some products such as postcards do not require envelopes, so this value will be
null
in those cases. This URL does not require authentication and can be retrieved with a standardGET
request.
{
"artwork": "happy-birthday",
"template": "happy-birthday-promo",
"messages": {
"pages": [
{
"page": 1,
"text": ""
},
{
"page": 2,
"text": ""
},
{
"page": 3,
"text": "",
"style": {
"color": "1144a7",
"verticalAlign": "center"
}
}
]
},
"variables": {
"firstName": "John",
"message": "Happy birthday from the Cardly team, we hope you have a great one!",
},
"recipient": {
"firstName": "John",
"lastName": "Doe",
"address": "10 Somewhere Place",
"address2": "",
"city": "Fairyland",
"region": "QLD",
"postcode": "4110",
"country": "AU"
},
"sender": {
"firstName": "Cardly Pty Ltd",
"lastName": "",
"address": "10 Another Lane",
"city": "Brisbane",
"region": "QLD",
"postcode": "4000",
"country": "AU"
},
"shippingMethod": "standard",
"shipToMe": false,
"requestedArrival": "2019-12-25",
"purchaseOrderNumber": "123ABC"
}
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"balance": 123,
"giftCredit": {
"balance": 2064.1,
"currency": "AUD"
},
"order": {
"creditCost": 0.5,
"giftCreditCost": 50,
"delivery": [
{
"requested": "2019-12-25",
"dispatch": "2019-12-12",
"estimatedMinArrival": "2019-12-17",
"estimatedMaxArrival": "2019-12-20"
}
]
},
"preview": {
"expires": "2019-12-10 23:11:38",
"format": "pdf",
"urls": {
"card": "http://api.card.ly/v2/preview/4e898074-6a2e-e3fb-9778-518596c36c2a/card/pdf",
"envelope": null
}
}
}
}
Place Order
The place
endpoint allows you to place an order for one or more items, being delivered to one or more distinct recipients. Generally, we recommend that individual orders are created for individual recipients to minimise potential validation and other rejection issues.
Note that you must have sufficient credit on your account to place your order. If you have insufficient credit, a 402
response will be returned with detail on the required credit cost and your current balance.
-
purchaseOrderNumberstring
-
A reference number to place against this order - useful to tie back to your existing systems for auditing.
-
linesarray
-
A list of one or more of the below
Order Item
structures to include into the overall order.
-
artworkstring
-
The unique artwork ID to use for this card. This may be the UUID or slug for a given piece of artwork under your organisation.
-
templatestring
-
The template ID to use top populate this card. If no template is specified, only the main text panels on the card will be utilised and no variable substitutions will occur.
-
styleStyle Object
-
Styles to apply to act as defaults for the whole card. This does not need to define all style object elements, only those you wish to override from a used template or default styles.
Please note: If you have specified a template, the
style
element will override any properties the template has set as defaults. -
messages.pages[].pageinteger
-
Numeric identifier for the page the rest of this element's settings apply to. This is a one-based numbering of card pages - front cover is 1, inside left is 2, etc.
-
messages.pages[].styleStyle Object
-
Styles to apply to the main text block on this page. This does not need to define all style object elements, only those you wish to override from a used template or default styles.
Please note: If you have specified a template, the
style
element will override any properties the template has set for this page. Currently, onlyalign
andverticalAlign
properties have an effect at a page level. -
messages.pages[].textstring
-
The main panel text to use for a given page. Note that this will only be utilised if the media supports placing text on this page. Most four page cards will restrict front/back panels to artwork only, while postcards typically accept only content for the back panel.
Please note: If you have specified a template, the
messages
element will be ignored entirely in favor of the template's text. -
variables[].(property)string
-
Zero or more variables to inject into a template, based on the variables supported by that template. This is a key => value mapped object based on the variables to use in the template.
-
recipient.firstNamestring
-
The recipient's first name, as it should appear on the envelope.
-
recipient.lastNamestring
-
The recipient's last name, as it should appear on the envelope.
-
recipient.companystring
-
The recipient's company, if required, as it should appear below their name on the envelope.
-
recipient.addressstring
-
The recipient's street number, name and type, ie. 10 Somewhere Lane
-
recipient.address2string
-
Unit, floor, apartment etc. additional information for the recipient's address.
-
recipient.citystring
-
Suburb or city for the recipient.
-
recipient.regionstring
-
State / province / region for the recipient, if required. UK and NZ currently do not require a region specified.
-
recipient.postcodestring
-
Postcode for the recipient.
-
recipient.countrystring
-
2-character ISO code for the country to ship to.
-
sender.firstNamestring
-
The sender's first name, as it should appear on the envelope.
Please note: the entire sender section is optional and will default to your organisation's return details if not completed. If any sender element is specified, all must be specified.
-
sender.lastNamestring
-
The sender's last name, as it should appear on the envelope.
-
sender.addressstring
-
The sender's street number, name and type, ie. 10 Somewhere Lane
-
sender.address2string
-
Unit, floor, apartment etc. additional information for the sender's address.
-
sender.citystring
-
Suburb or city for the sender.
-
sender.regionstring
-
State / province / region for the sender, if required. UK and NZ currently do not require a region specified.
-
sender.postcodestring
-
Postcode for the sender.
-
sender.countrystring
-
2-character ISO code for the country to use for the return address.
-
sender.omitAddressboolean
-
If true, the sender's address will not appear on envelopes.
-
shippingMethodstring
-
The shipping method to use. Note that shipping method support is on a per-region basis, but all regions will at minimum support the
standard
shipping method.Currently, only Australia supports the additional
priority
andexpress
shipping methods. Note that both of these methods have additional credit costs associated with their use.Please note: Australia Post has suspended use of priority post effective 1st June 2020 until further notice. For expedited shipping within Australia, please utilise
express
post as an interim measure. This also has the added advantage of providing tracking for your order. -
shipToMeboolean
-
If set to
true
, denotes that the recipient of this card is also the sender and to include an additional, blank envelope. Note that this incurs a small additional credit cost. -
requestedArrivaldate
-
A future requested arrival date for this card. In a preview request, this will provide a basis for shipping window estimates to be returned. If not specified, immediate dispatch is assumed and dates will be calculated based on the current date.
-
balancefloat
-
Your organisation's current credit balance after this order has been charged.
-
giftCreditobject
-
Your organisation's current gift credit balance and currency.
-
orderOrder Object
-
An
Order
object representing the order you just placed.
{
"lines": [
{
"artwork": "happy-birthday",
"template": "happy-birthday-promo",
"quantity": 1,
"messages": {
"pages": [
{
"page": 1,
"text": ""
},
{
"page": 2,
"text": ""
},
{
"page": 3,
"text": "",
"style": {
"color": "1144a7",
"verticalAlign": "center"
}
}
]
},
"variables": {
"firstName": "John",
"message": "Happy birthday, we hope you have a great day!"
},
"recipient": {
"firstName": "John",
"lastName": "Doe",
"address": "10 Somewhere Place",
"address2": "",
"city": "Fairyland",
"region": "QLD",
"postcode": "4110",
"country": "AU"
},
"sender": {
"firstName": "Cardly Pty Ltd",
"lastName": null,
"address": "10 Another Lane",
"address2": null,
"city": "Brisbane",
"region": "QLD",
"postcode": "4000",
"country": "AU"
},
"shippingMethod": "standard",
"shipToMe": false,
"requestedArrival": "2019-12-25"
}
],
"purchaseOrderNumber": "12345a"
}
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"balance": 99.73,
"giftCredit": {
"balance": 2064.1,
"currency": "AUD"
},
"order": {
"id": "c988c0c0-f6a3-4e90-bbd5-759497a82607",
"status": "paid",
"origin": "api",
"description": null,
"customer": {
"firstName": "Cardly Pty Ltd",
"lastName": null,
"address": "10 Another Lane",
"address2": null,
"city": "Brisbane",
"region": "QLD",
"postcode": "4000",
"country": "AU"
},
"currency": "AUD",
"pricing": {
"credits": 2.8,
"giftCredit": 50
},
"timings": {
"paid": "2019-12-04 12:06:46",
"created": "2019-12-04 12:06:46",
"updated": "2019-12-04 12:06:46"
},
"items": [
{
"id": "60051a2c-86af-45bb-a34f-febf37d9070c",
"type": "card",
"label": "Cardly - Happy Birthday",
"quantity": 1,
"costs": {
"credits": 0.5,
"giftCredit": 0
},
"shipTo": "S",
"shipMethod": "standard",
"scheduledDate": "2019-12-25 00:00:00",
"recipient": {
"address": "10 Somewhere Place",
"address2": "",
"city": "Fairyland",
"region": "QLD",
"postcode": "4110",
"country": "AU"
},
"sender": {
"name": "Cardly",
"address": "10 Another Lane",
"address2": null,
"city": "Brisbane",
"region": "QLD",
"postcode": "4000",
"country": "AU"
},
"timings": {
"lodgeAfter": "2019-12-04 12:06:46",
"shipped": null,
"lodged": null,
"held": null
},
"delivery": {
"requested": "2019-12-25",
"dispatch": "2019-12-12",
"estimatedMinArrival": "2019-12-17",
"estimatedMaxArrival": "2019-12-20"
},
"media": 3,
"artwork": "5c40d96b-b7c3-4980-9bdc-14306104ebd4",
"template": "73bf3d63-5bca-45dc-86f6-d5c01946d78b",
"related": [
{
"id": "3ae265f0-0f63-4018-a0a1-c26d31a3179f",
"type": "envelope",
"label": "Additional envelope",
"quantity": 1,
"costs": {
"credits": 0.03,
"giftCredit": 0
},
"related": []
},
{
"id": "51897b27-81d6-e82b-dcfe-36f748d516e9",
"type": "gift-card",
"label": "Gift Card: Amazon Gift Card Card for $50",
"quantity": 1,
"costs": {
"credits": 0,
"giftCredit": 50
},
"related": []
}
]
}
]
}
},
"testMode": true
}
Invitations
The invitations
endpoints provide the ability to create, manipulate and interrogate lists of invitations to access your organisation account.
These allow you to programatically and on-demand provide access to your account to allow users to send via your portal and use credits (if permitted). Such access is particularly useful for promotions or internal activities, such as penpal and gratitude initiatives.
/v2/invitations
/v2/invitations
/v2/invitations/{id}
/v2/invitations/find
/v2/invitations/resend
/v2/invitations/{id}
Invitation Object
The invitation object provides detail on user that's been invited to your account and the status of that invitation.
-
idUUID
-
Unique identifier for this invitation.
-
firstNamestring
-
The invited user's first name, if known.
-
lastNamestring
-
The invited user's last name, if known.
-
emailstring
-
The invited user's email address.
-
statusstring
-
The current status of this invitation.
-
permissionsobject
-
Permission-keyed list of permissions available once this invitation is accepted.
-
inviteddatetime
-
When the invitation was created.
-
inviteSentdatetime
-
When the user's email invitation was sent.
-
accepteddatetime
-
When the invitation was accepted, if at all.
-
expiresdatetime
-
When the invitation expires.
-
links.accepturl
-
The acceptance URL for this invitation.
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "invited",
"permissions": {
"lists": true,
"orders": true,
"templates": true
},
"invited": "2022-03-14 12:34:27",
"inviteSent": "2021-03-14 12:35:53",
"accepted": null,
"expires": "2021-03-17 12:35:01",
"links": {
"accept": "https://avengers.cardly.net/invitations/accept/8d207658-12fc-6068-23fe-09135f7b31f1/e167ed69-a05f-1b1c-2bb9-0cf8b73fb57c"
}
}
Invitation Listing
Retrieve active invitations for your organisation.
-
expiredOnlyboolean
-
If truthy, only return expired invitations.
-
acceptedOnlyboolean
-
If truthy, only return accepted invitations.
-
includeAcceptedboolean
-
If truthy, includes accepted invitations in the response.
-
resultsarray
-
A paginated array of zero or more
Invitation
objects.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 8,
"limit": 25,
"offset": 0,
"totalRecords": 8
},
"results": [
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "invited",
"permissions": {
"lists": true,
"orders": true,
"templates": true
},
"invited": "2022-03-14 12:34:27",
"inviteSent": "2021-03-14 12:35:53",
"accepted": null,
"expires": "2021-03-17 12:35:01",
"links": {
"accept": "https://avengers.cardly.net/invitations/accept/8d207658-12fc-6068-23fe-09135f7b31f1/e167ed69-a05f-1b1c-2bb9-0cf8b73fb57c"
}
},
...
]
}
}
Get Invitation
Retrieve information on a specific invitation, identified by Cardly's unique identifier for the record.
-
(Data Body)Invitation Object
-
An invitation object representing the requested information.
(No body required)
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "invited",
"permissions": {
"lists": true,
"orders": true,
"templates": true
},
"invited": "2022-03-14 12:34:27",
"inviteSent": "2021-03-14 12:35:53",
"accepted": null,
"expires": "2021-03-17 12:35:01",
"links": {
"accept": "https://avengers.cardly.net/invitations/accept/8d207658-12fc-6068-23fe-09135f7b31f1/e167ed69-a05f-1b1c-2bb9-0cf8b73fb57c"
}
}
Find Invitation
Retrieve information on a specific invitation, searching by a provided email address.
-
emailstring
-
The email address to search for.
-
(Data Body)Invitation Object
-
An invitation object representing the requested information.
(No body required)
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "invited",
"permissions": {
"lists": true,
"orders": true,
"templates": true
},
"invited": "2022-03-14 12:34:27",
"inviteSent": "2021-03-14 12:35:53",
"accepted": null,
"expires": "2021-03-17 12:35:01",
"links": {
"accept": "https://avengers.cardly.net/invitations/accept/8d207658-12fc-6068-23fe-09135f7b31f1/e167ed69-a05f-1b1c-2bb9-0cf8b73fb57c"
}
}
Add Invitation
Send an invitation to use your organisation portal, assuming the provided email address doesn't already have access.
-
firstNamestring
-
The first name of the user.
-
lastNamestring
-
The last name of the user.
-
emailstring
-
An email address for this user.
-
permissionsarray
-
Zero or more permission identifiers from the following list, denoting the privileges to grant the user once they accept your invitation:
administrator
artwork
billing
campaigns
developer
lists
moderate
moderate-history
orders
templates
users
use-credits
use-saved-card
-
(Data Body)Invitation Object
-
An object representing the invitation that was just created. Use the ID property from this to feed into further requests as needed.
{
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"permissions": ["users", "templates", "orders"]
}
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "invited",
"permissions": {
"lists": true,
"orders": true,
"templates": true
},
"invited": "2022-03-14 12:34:27",
"inviteSent": "2021-03-14 12:35:53",
"accepted": null,
"expires": "2021-03-17 12:35:01",
"links": {
"accept": "https://avengers.cardly.net/invitations/accept/8d207658-12fc-6068-23fe-09135f7b31f1/e167ed69-a05f-1b1c-2bb9-0cf8b73fb57c"
}
}
Resend Invitation
Resend an invitation if that invitation has not been accepted.
Note that one of email or ID is required to uniquely find an invitation to resend.
-
idstring
-
The ID unique to the invitation to resend.
-
emailstring
-
The email address to search for.
-
(Data Body)Invitation Object
-
The invitation object representing the invitation that was resent.
{
"email": "thor@avengers.com"
}
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "invited",
"permissions": {
"lists": true,
"orders": true,
"templates": true
},
"invited": "2022-03-14 12:34:27",
"inviteSent": "2021-03-14 12:35:53",
"accepted": null,
"expires": "2021-03-17 12:35:01",
"links": {
"accept": "https://avengers.cardly.net/invitations/accept/8d207658-12fc-6068-23fe-09135f7b31f1/e167ed69-a05f-1b1c-2bb9-0cf8b73fb57c"
}
}
Delete Invitation
Delete an invitation, immediately invalidating it for acceptance.
Note that one of email or ID is required to uniquely find an invitation to remove.
-
idstring
-
The ID unique to the invitation to revoke.
-
emailstring
-
The email address to search for.
-
(Data Body)Invitation Object
-
The invitation object representing the invitation that was deleted.
{
"email": "thor@avengers.com"
}
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "invited",
"permissions": {
"lists": true,
"orders": true,
"templates": true
},
"invited": "2022-03-14 12:34:27",
"inviteSent": "2021-03-14 12:35:53",
"accepted": null,
"expires": "2021-03-17 12:35:01",
"links": {
"accept": "https://avengers.cardly.net/invitations/accept/8d207658-12fc-6068-23fe-09135f7b31f1/e167ed69-a05f-1b1c-2bb9-0cf8b73fb57c"
}
}
Users
The users
endpoints provide the ability to interrogate and remove users who have access your organisation account.
These allow you to programatically and check and remove access to your account as required.
Please note: Access can not be removed for users with administrator
privileges on your account. These must be removed via your portal directly.
/v2/users
/v2/users/{id}
/v2/users/find
/v2/{id}
User Object
The user object provides detail on user has accepted an invitation to use your to your account.
-
idUUID
-
Unique identifier for this user.
-
firstNamestring
-
The user's first name, if known.
-
lastNamestring
-
The user's last name, if known.
-
emailstring
-
The user's email address.
-
statusstring
-
The current status of this user.
-
permissionsobject
-
Permission-keyed list of permissions available to this user.
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "active",
"permissions": {
"lists": true,
"orders": true,
"templates": true
}
}
User Listing
Retrieve active users for your organisation.
-
resultsarray
-
A paginated array of zero or more
User
objects.
(No body required)
{
"state": {
"status": "OK",
"messages": []
},
"data": {
"meta": {
"startRecord": 1,
"lastRecord": 8,
"limit": 25,
"offset": 0,
"totalRecords": 8
},
"results": [
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "invited",
"permissions": {
"lists": true,
"orders": true,
"templates": true
}
},
...
]
}
}
Get User
Retrieve information on a specific user, identified by Cardly's unique identifier for the record.
-
(Data Body)User Object
-
A user object representing the requested information.
(No body required)
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "active",
"permissions": {
"lists": true,
"orders": true,
"templates": true
}
}
Find User
Retrieve information on a specific user, searching by a provided email address.
-
emailstring
-
The email address to search for.
-
(Data Body)User Object
-
A user object representing the requested information.
(No body required)
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "active",
"permissions": {
"lists": true,
"orders": true,
"templates": true
}
}
Delete User
Remove a user's access from your account immediately.
Note that one of email or ID is required to uniquely find a user to remove.
Please note: Access can not be removed for users with administrator
privileges on your account. These must be removed via your portal directly.
-
idstring
-
The ID unique to the user to revoke.
-
emailstring
-
The email address to search for.
-
(Data Body)User Object
-
The user object representing the user that was deleted.
{
"email": "thor@avengers.com"
}
{
"id": "8d207658-12fc-6068-23fe-09135f7b31f1",
"firstName": "Thor",
"lastName": "Odinson",
"email": "thor@avengers.com",
"status": "active",
"permissions": {
"lists": true,
"orders": true,
"templates": true
}
}