Reseller.createClientAccount

Create an account for your client. The new account will be linked to your reseller account.

This method is only available to reseller accounts.

Request template

This method API requires a POST request using the Content-Type 'application/json' and a JSON encoded request body. POST to the following URL:

https://api.postcode.eu/reseller/v1/client

Example REST request

A POST to /reseller/v1/client with the proper authentication would use the following HTTP Request:

POST /reseller/v1/client HTTP/1.1
Host: api.postcode.eu
Authorization: Basic 2eTpkU******…
{
	"companyName": "Klant B.V.",
	"countryIso": "NLD",
	"vatNumber": "NL123456789B01",
	"contactEmail": "contact@example.org",
	"subscriptionAmount": 100,
	"siteUrls": ["https://www.example.org"],
	"invoiceEmail": "invoice@example.org",
	"invoiceReference": "PO 1234",
	"invoiceAddressLine1": "Julianastraat 30",
	"invoiceAddressLine2": "",
	"invoiceAddressPostalCode": "2012ES",
	"invoiceAddressLocality": "Haarlem",
	"invoiceAddressRegion": "",
	"invoiceAddressCountryIso": "NLD",
	"invoiceContactName": "Contact Name on Invoice",
}

Example response

The lookup is successful so we receive a 200 OK status in the headers:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

And a JSON response in the body:

{
	"accountId": "3414456543",
	"key": "mI1gIDthWXxg8gL7bKJbF183VCrJBkufer0ob9ooq9S",
	"secret": "YXmoe0N7vvTJneKVuikHh4iH0SU1gfdmRpCiGnQz4POVSOOSSb"
}

Parameters

companyName: string

The client company name

countryIso: string

The country code

vatNumber: string

The VAT number. Required if countryIso indicates an EU member country other than the Netherlands. May be left empty otherwise.

contactEmail: string

The primary contact email

subscriptionAmount: int

The subscription amount. Possible values: 0, 50, 100, 250, 500, 1000. Specify 0 to create a test account without a subscription.

siteUrls: string[]

An array of site URL's belonging to the client, especially sites where the API will be used. This helps us offer better support. May be empty.

invoiceEmail: string

The email address that will receive invoices.

invoiceReference: string

An optional reference that will be included on the invoice

invoiceAddressLine1: string

Invoice mail address line 1

invoiceAddressLine2: string

Invoice mail address line 2, may be empty

invoiceAddressPostalCode: string

Invoice mail address postal code

invoiceAddressLocality: string

Invoice mail address locality

invoiceAddressRegion: string

The invoice address region, may be empty

invoiceAddressCountryIso: string

Invoice mail address country

invoiceContactName: string or null

Optional parameter. The contact name that will be included on the invoice, if null no contact name is added.

isTest: boolean

Optional parameter. Specify 'true' to perform a test and receive a dummy response, instead of actually creating an account.

Returns

accountId: int

The id of the new account

key: string

The public key for the client's account to access the API

secret: string

The secret to use with the key