REST Accounting

Contains the functionality to get, create, update or delete an accounting location as well as to list several accounting locations. Each plentymarkets client (store) can have several accounting locations. One location is the standard location for the client.

Get the ID of an accounting location of a country

Gets the ID of an accounting location of a country. The plenty ID of the client and the ID of the country must be specified.

/rest/stores/{plentyId}/locations

Parameters

Field Type Description
countryId Int The ID of the country of the accounting location. The default accounting location of the client will be returned if the ID of a country is not specified.

Success 200

Field Type Description
id Int The ID of the accounting location
countryId Int The ID of the country of the accounting location
name String The name of the accounting location
clientId Int The ID of the client that the accounting location belongs to
plentyId Int The plenty ID of the client that the accounting location belongs to

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get an accounting location

Gets an accounting location. The ID of the accounting location must be specified.

/rest/accounting/locations/{locationId}

Parameters

Field Type Description
locationId Int The ID of the accounting location

Success 200

Field Type Description
id Int The ID of the accounting location
countryId Int The ID of the country of the accounting location
name String The name of the accounting location
clientId Int The ID of the client that the accounting location belongs to
plentyId Int The plenty ID of the client that the accounting location belongs to
{"id":3,"name":"Spain","countryId":8,"clientId":0,"plentyId":94}

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

List accounting locations of a client

Lists accounting locations of a client. The plenty ID of the client must be specified.

/rest/accounting/stores/{plentyId}/locations

Parameters

Field Type Description
locationId Int The plenty ID

Success 200

Field Type Description
id Int The ID of the accounting location
countryId Int The ID of the country of the accounting location
name String The name of the accounting location
clientId Int The ID of the client that the accounting location belongs to
plentyId Int The plenty ID of the client that the accounting location belongs to
[{"id":6,"name":"France","countryId":10,"clientId":0,"plentyId":94},{"id":95,"name":"Italy","countryId":15,"clientId":0,"plentyId":94}]

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

List all accounting locations

/rest/accounting/stores/locations

Success 200

Field Type Description
id Int The ID of the accounting location
countryId Int The ID of the country of the accounting location
name String The name of the accounting location
clientId Int The ID of the client that the accounting location belongs to
plentyId Int The plenty ID of the client that the accounting location belongs to

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get accounting location settings

Gets accounting location settings. The ID of the accounting location must be specified.

/rest/accounting/locations/{locationId}/settings

Parameters

Field Type Description
locationId Int The ID of the accounting location

Success 200

Field Type Description
locationId Int The ID of the accounting location
isInvoiceEUNet Bool Is the invoice net for EU?
isInvoiceExportNet Bool Is the invoice net for export?
showShippingVat Bool Show the vat for shipping costs on the invoice?
isSmallBusiness Bool Is it a small business?
numberOfDecimalPlaces Int The number of decimal places for prices
roundTotalsOnly Bool Do only round totals?

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Create an accounting location

Creates an accounting location for a client. The plenty ID of the client must be specified.

/rest/accounting/locations

Request

Field Type Description
countryId Int The ID of the country of the accounting location required
name String The name of the accounting location required
plentyId Int The plenty ID of the client that the accounting location belongs to required
{"name":"Greece","countryId":13,"plentyId":123456}

Success 200

Field Type Description
id Int The ID of the accounting location
countryId Int The ID of the country of the accounting location
name String The name of the accounting location
clientId Int The ID of the client that the accounting location belongs to
plentyId Int The plenty ID of the client that the accounting location belongs to
{"id":5,"name":"Greece","countryId":13,"clientId":0,"plentyId":94}

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Update an accounting location

Updates an accounting location. The ID of the accounting location must be specified.

/rest/accounting/locations/{locationId}

Parameters

Field Type Description
locationId Int The ID of the accounting location

Request

Field Type Description
name String The name of the accounting location optional
{"name":"Portugal"}

Success 200

Field Type Description
id Int The ID of the accounting location
countryId Int The ID of the country of the accounting location
name String The name of the accounting location
clientId Int The ID of the client that the accounting location belongs to
plentyId Int The plenty ID of the client that the accounting location belongs to
{"id":6,"name":"Portugal","countryId":22,"clientId":0,"plentyId":94}

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Delete an accounting location

Deletes an accounting location. The ID of the accounting location must be specified. Standard accounting locations can not be deleted.

/rest/accounting/locations/{locationId}

Parameters

Field Type Description
locationId Int The ID of the accounting location

Success 200

This call does not have a response output.

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get the revenue account configuration of an accounting location

Gets the revenue account configuration of an accounting location. A revenue account location configuration contains several revenue accounts. The ID of the accounting location has to be specified.

/rest/accounting/locations/{locationId}/revenue_account_configurations

Parameters

Field Type Description
locationId Int The ID of the accounting location.

Success 200

Field Type Description
id Int The ID of the revenue account configuration
locationId Int The ID of the accounting location that the configuration belongs to
accountEu String The account used for revenues that are exempt from VAT and that were sold within the European Union
accountExport String The account used for revenues that are exempt from VAT and that were sold to outside the European Union

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

List revenue account configurations

Lists revenue account configurations of a system. The revenue accounts are returned as paginated result. By default 50 revenue accounts are on one page.

/rest/accounting/locations/revenue_account_configurations

Parameters

Field Type Description
page Int The page to get. The default page that will be returned is page 1.
itemsPerPage Int The number of revenue accounts to be displayed per page. The default number of orders per page is 50.

Success 200

Field Type Description
page Int Current page of the response
totalsCount Int The total number of entries in the response
isLastPage Bool Flag that indicates if the page shown is the last page of the response
lastPageNumber Int The last page number
firstOnPage Int The index of the first item of the current page result
lastOnPage Int The index of the last item of the current page result
itemsPerPage Int The requested amount of items per result page
entries RevenueAccountLocationConfiguration[] List of RevenueAccountLocationConfiguration
 id Int The ID of the revenue account configuration
 locationId Int The ID of the accounting location that the configuration belongs to
 accountEu String The account used for revenues that are exempt from VAT and that were sold within the European Union
 accountExport String The account used for revenues that are exempt from VAT and that were sold to outside the European Union

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get the revenue account configuration of a country

Get the revenue account configuration of a country. The ID of the accounting location that the country is associated with as well as the ID of the country must be specified.

/rest/accounting/locations/{locationId}/countries/{countryId}/revenue_accounts

Parameters

Field Type Description
locationId Int The ID of the accounting location.
countryId Int The ID of the country.

Success 200

Field Type Description
countryId Int The ID of the country that the account configuration belongs to
revenueAccountLocationId Int The ID configuration of the revenue account that these accounts are for.

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get a posting key configuration of an accounting location

Gets a posting key configuration of an accounting location. The ID of the accounting location has to be specified. The posting key configuration can contain up to 4 posting keys.

/rest/accounting/locations/{locationId}/posting_key_configurations

Parameters

Field Type Description
locationId Int The ID of the accounting location.

Success 200

Field Type Description
locationId Int The ID of the accounting location that the configuration belongs to

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get debtor account configuration of an accounting location

Gets the debtor account configuration of an accounting location. The ID of the accounting location has to be specified. The debtor account configuration can contain one standard debtor account only or e.g. several accounts for each country of delivery.

/rest/accounting/locations/{locationId}/debtor_account_configurations

Parameters

Field Type Description
locationId Int The ID of the accounting location.

Success 200

Field Type Description
id Int The ID of the debtor account configuration
locationId Int The ID of the accounting location that the debtor account is associated with.
mode String The mode describes the criteria based on which pending amounts are assigned to a debtor account. The following modes are available:
  • character = The debtor accounts are selected based on the first character of customer information. The information and the order of the information that will be used are defined with the sequence. There are 3 different sequences available.
  • payment = The debtor accounts are selected based on the payment method.
  • country = The debtor accounts are selected based on the country of delivery.
  • country_payment = The debtor accounts are selected based on two criteria. The first criteria is the country and if the country is same as the country of the accounting location then the payment method is used to select the deptor account.
sequence String The sequence defines the order in which customer information will be used for the debtor account assignment if the character made has been chosen. The following sequences are available:
  • FNV = stands for the sequence: company, lastname, firstname
  • NVF = stands for the sequence: lastname, firstname, company
  • NFV = stands for the sequence: lastname, company, firstname
standard String The standard debtor account that will be used if no matching debtor account can be found.
save Bool Flag that indicates if the debtor account shall be saved within the contact data.

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Lists the debtor accounts by mode.

Lists the debtor accounts of an accounting location by mode. The ID of the accounting location and the mode have to be specified.

/rest/accounting/locations/{locationId}/debtor_accounts/{mode}

Parameters

Field Type Description
locationId Int The ID of the accounting location.
mode String The mode defines how pending amounts are assigned to debtor accounts. The following modes are available:
  • character = The debtor accounts are selected based on the first character of customer information. The information and the order of the information that will be used are defined with the sequence. There are 3 different sequences available.
  • payment = The debtor accounts are selected based on the payment method.
  • country = The debtor accounts are selected based on the country of delivery.
  • country_payment = The debtor accounts are selected based on two criteria. The first criteria is the country and if the country is same as the country of the accounting location then the payment method is used to select the deptor account.

Success 200

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get all posting accounts

/rest/accounting/locations/posting_accounts

Success 200

Field Type Description
id Int
locationId Int
type String
position Int
subtype String
name String
account String

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Save posting accounts

/rest/accounting/locations/posting_accounts

Success 200

Field Type Description
id Int
locationId Int
type String
position Int
subtype String
name String
account String

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Gets posting account by the unique id

/rest/accounting/locations/posting_accounts/{id}

Success 200

Field Type Description
id Int
locationId Int
type String
position Int
subtype String
name String
account String

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get all unique posting accounts

/rest/accounting/locations/existing_accounts

Success 200

Field Type Description
id Int
locationId Int
type String
position Int
subtype String
name String
account String

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Delete an posting account

/rest/accounting/locations/posting_accounts/{id}

Parameters

Field Type Description
id Int The ID of the posting account

Success 200

This call does not have a response output.

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get all posting accounts by locationId

/rest/accounting/locations/{locationId}/posting_accounts

Parameters

Field Type Description
locationId Int The ID of the accounting location.

Success 200

Field Type Description
id Int
locationId Int
type String
position Int
subtype String
name String
account String

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get all posting accounts for a country of a webstore

/rest/accounting/locations/{webstoreId}/{countryId}/posting_accounts

Parameters

Field Type Description
countryId Int The ID of the country
$webstoreId Int The ID of the webstore

Success 200

Field Type Description
id Int
locationId Int
type String
position Int
subtype String
name String
account String

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Get all posting accounts by locationId and type

/rest/accounting/locations/{locationId}/{type}/posting_accounts

Parameters

Field Type Description
locationId Int The ID of the accounting location.
type String The type of the PostingAccount.

Success 200

Field Type Description
id Int
locationId Int
type String
position Int
subtype String
name String
account String

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Is this article helpful?

 

Thank you for your Feedback

you can close this field now!