Syncing customer data via API

Sending customer data to CitrusAd

To send customer data to CitrusAd, use a command similar to the one below. Note that the data in the customers field is dummy data, and is provided here as an example only.

๐Ÿ“˜

All customer object fields are optional. If you push a customer object without any field values, a new id will be created, so donโ€™t specify an id if you are creating customer objects.

All values in the targetingData field are arbitrary and configurable by the retailer. Please visit the reference page for more information.

POST $BASE_URL/v1/customers HTTP/1.1 
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "customers": [
        {
            "id": "i4358f9b-bbb9-49fb-93fe-3ad481ce564",
            "targetingData": {
            "customer_type": "Corporate"
            }
        }
    ]
}

If successful, the following object will be returned:

{
    "customers": [
        {
            "targetingData": {
                "customer_type": "Corporate"
            },
            "gender": "Other",
            "teamId": "9be784a8-22fc-4315-a335-b7d2c2494f0a",
            "postcode": "",
            "suburb": "",
            "id": "i4358f9b-bbb9-49fb-93fe-3ad481ce564",
            "yearOfBirth": 0
        }
    ]
}

Syncing multiple customers

If you are syncing multiple customers, you can send up to 100 items as a batch with each request. The number of requests you can make is unlimited.

The customer payload order pushed is the same order as the result returned, making it possible for the data to remain congruent with the customer representation the integrator maintains in their backend.

POST $BASE_URL/v1/customers HTTP/1.1 
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "customers": [
        {
            "id": "i4358f9b-bbb9-49fb-93fe-3ad481ce564",
            "targetingData": {
            "customer_type": "Corporate"
            }
        },
        {
            "id": "c7792468-07ea-4cc3-9b1a-975bb43dfa02",
            "targetingData": {
            "customer_type": "Retail"
            }
        }
    ]
}

If successful, the following object will be returned:

{
    "customers": [
        {
            "targetingData": {
                "customer_type": "Corporate"
            },
            "gender": "Other",
            "teamId": "9be784a8-22fc-4315-a335-b7d2c2494f0a",
            "postcode": "",
            "suburb": "",
            "id": "i4358f9b-bbb9-49fb-93fe-3ad481ce564",
            "yearOfBirth": 0
        },
        {
            "targetingData": {
                "customer_type": "Retail"
            },
            "gender": "Other",
            "teamId": "9be784a8-22fc-4315-a335-b7d2c2494f0a",
            "postcode": "",
            "suburb": "",
            "id": "c7792468-07ea-4cc3-9b1a-975bb43dfa02",
            "yearOfBirth": 0
        }
    ]
}

Please visit our glossary page for an explanation of all documentation terms.

๐Ÿ“˜

If youโ€™re unsure about the strings outlined in this section, please visit the reference page.

Ingesting bulk customer data

When integrating, we recommend that you send your first batch of customer data as a file for ingestion, as the API accepts batches of 100 at a time.