Create Account
POST
https://apisandbox.younium.com/v1/account
Below is a basic example of how to create an account:
{
domain: 'client.com',
accountType: 'customer',
name: 'Client Inc.',
organizationNumber: '5555555555',
inactive: false
}
Here is a bit more complex example, creating a new customer with default invoice address, using lookup for the address country:
{
domain: 'customer.com',
accountType: 'customer',
name: 'Customer Inc',
currencyCode: {
code: 'USD',
key: 'code'
},
inactive: false,
invoiceEmailAddress: 'invoice@customer.com', communicationPreference: 'email',
defaultInvoiceAddress: {
street: 'Street 1',
street2: 'Box 21',
city: 'City',
zip: '12345',
countryId: {
twoAlphaCode: 'US',
key: 'twoAlphaCode'
}
},
yourReference: 'Your Ref',
salesReference: 'Our Ref',
taxRegistrationNumber: 'US555555555501',
organizationNumber: '5555555555'
}
Update account
PATCH
https://apisandbox.younium.com/v1/account
Here is a basic example of updating an account, changing the field Your Reference. The example uses the account domain as key.
{
key: 'domain',
domain: 'client.com',
yourReference: 'Your new reference'
}