Accounts Import - API Connector - Overview
This documentation describes the process of importing Accounts via the API Connector. It covers the available fields, business rules, and possible errors.
⚙️ Introduction
This job is designed to create and update Accounts and their Shipping Addresses by connecting your API gateway to DJUST using the API Connector. It processes data sent in JSON format from a REST API.
📂 Accepted Payload Structure
The accepted payload format specifies the structure required for successful data transmission through the API Connector. Ensuring the payload adheres to this format guarantees efficient integration of Accounts and their Shipping Addresses within DJUST platform.
There are two possible structures depending on how the Shipping Address is sent. Regardless of the structure, the JSON must always be a list of objects.
Payload structure example
[
//object 1
\{
},
//object 2
\{
},
etc.
]
Shipping Address sent in a list of objects
[
{
"accountName":"Smith",
"accountManagerName":"Smith",
"accountWebsite": "string",
"accountExternalId":"0987654321",
"customerTagExternalId": "string",
"accountVatNumber": "string",
"companyRegistrationName":"Smith & Co. LLC",
"businessRegistrationNumber":"BRN987654321",
"deleted": "false",
"inactive": "false",
"shippingAddress":[
{
"addressExternalId":"ADDR54321",
"addressFullName":"Jane Smith",
"addressCountry":"Canada",
"addressCity":"Toronto",
"addressZipCode":"M5H 2N2",
"addressStreetName":"456 Queen St W"
},
{
"addressExternalId":"ADDR98765",
"addressFullName":"Robert Smith",
"addressCountry":"USA",
"addressCity":"San Francisco",
"addressZipCode":"94103",
"addressStreetName":"789 Market St"
}
]
},
{
"accountName":"John",
"accountManagerName":"Smith",
"accountWebsite": "string",
"accountExternalId":"09876543561",
"customerTagExternalId": "string",
"accountVatNumber": "string",
"companyRegistrationName":"Bertrand & Co. LLC",
"businessRegistrationNumber":"GRU987654321",
"shippingAddress":[
{
"addressExternalId":"ADDR9999",
"addressFullName":"John Doe",
"addressCountry":"USA",
"addressCity":"NY",
"addressZipCode":"M5H 2N2",
"addressStreetName":"54 Queen St W"
},
{
"addressExternalId":"ADDR98765",
"addressFullName":"Robert Smith",
"addressCountry":"USA",
"addressCity":"San Francisco",
"addressZipCode":"94103",
"addressStreetName":"789 Market St"
}
]
}
]
Shipping Address sent with flat object structure
[
{
"accountName":"Smith",
"accountManagerName":"Smith",
"accountWebsite": "string",
"accountExternalId":"0987654321",
"customerTagExternalId": "string",
"accountVatNumber": "string",
"companyRegistrationName":"Smith & Co. LLC",
"businessRegistrationNumber":"BRN987654321",
"deleted": "false",
"inactive": "false",
"addressExternalId":"ADDR54321",
"addressFullName":"Jane Smith",
"addressCountry":"Canada",
"addressCity":"Toronto",
"addressZipCode":"M5H 2N2",
"addressStreetName":"456 Queen St W"
},
{
"accountName":"John",
"accountManagerName":"Smith",
"accountWebsite": "string",
"accountExternalId":"09876543561",
"customerTagExternalId": "string",
"accountVatNumber": "string",
"companyRegistrationName":"John & Co. LLC",
"businessRegistrationNumber":"GRU987654321",
"addressExternalId":"ADDR9999",
"addressFullName":"John Doe",
"addressCountry":"USA",
"addressCity":"NY",
"addressZipCode":"M5H 2N2",
"addressStreetName":"54 Queen St W"
}
]
📋 Fields
Field | Definition | Required on creation | Required on update | Editable | Default value |
---|---|---|---|---|---|
| Account name | ✅ | ✅ | ||
| Account manager name | ✅ | |||
| Unique external identifier | ✅ | ✅ | ||
| Website URL | ✅ | |||
| Registered company name | ✅ | ✅ | ||
| Business registration number | ✅ | ✅ | ||
| External customer tag ID | ✅ | |||
| VAT number of the Account | ✅ | |||
| Deletes the Account | ✅ |
| ||
| Deactivates the Account | ✅ |
| ||
| External identifier of the shipping address | ✅ | ☑️ (Only required when updating the Shipping Address) | ||
| Full name associated with the shipping address | ✅ | ✅ | ||
| Country of the shipping address | ✅ | ✅ | ||
| City of the shipping address | ✅ | ✅ | ||
| Zip code of the shipping address | ✅ | ✅ | ||
| Street name of the shipping address | ✅ | ✅ | ||
| Label for identifying the shipping address | ✅ | |||
| Additional information about the shipping address | ✅ | |||
| Phone number associated with the shipping address | ✅ |
✅ Required ☑️ Conditionally required
🔗 Data Mapping
The way you map the data may vary depending on how the Shipping Addresses are sent.
Shipping Addresses as a list of objects
When mapping Accounts that include nested data structures (such as Shipping Address), it is essential to map the parent parameter (representing the array of objects) first before mapping the fields within each object inside the array.
[
{
"accountName":"Smith",
"accountExternalId":"0987654321",
"companyRegistrationName":"Smith & Co. LLC",
"businessRegistrationNumber":"BRN987654321",
"shippingAddress":[
{
"addressExternalId":"ADDR54321",
"addressFullName":"Jane Smith",
"addressCountry":"Canada",
"addressCity":"Toronto",
"addressZipCode":"M5H 2N2",
"addressStreetName":"456 Queen St W"
}
]
}
]
Accounts with flat object structures
When mapping Accounts where the data is structured as a flat list of objects, each object in the array contains both account information and address attributes at the same level. In this format, the mapping approach differs from nested data structures
[
{
"accountName":"Smith",
"accountManagerName":"Smith",
"accountWebsite": "string",
"accountExternalId":"0987654321",
"customerTagExternalId": "string",
"accountVatNumber": "string",
"companyRegistrationName":"Smith & Co. LLC",
"businessRegistrationNumber":"BRN987654321",
"deleted": "false",
"inactive": "false",
"addressExternalId":"ADDR54321",
"addressFullName":"Jane Smith",
"addressCountry":"Canada",
"addressCity":"Toronto",
"addressZipCode":"M5H 2N2",
"addressStreetName":"456 Queen St W"
}
]
Required Custom FieldsCustom Fields that are required on DJUST must be provided in the API response
🧠 Key Business Rules & Notes
-
An Account can have one or more Shipping Addresses
-
A Shipping Address can be associated with multiple Accounts. In this case, you still have to provided all the mandatory information related to the Shipping Address and not only its
addressExternalId
-
It is not possible to import a Billing Address
-
It is not possible to update an existing Address that is already associated with another Account while simultaneously linking it to this new Account
-
Empty fields in standard columns do not delete the recorded values
-
Empty fields in Custom Fields delete the recorded values
Best Practices✔️ Map the Shipping Address correctly based on its structure
✔️ Map the required Custom Fields
✔️ Follow data formatting guidelines for optimal import results
Updated 18 days ago