REST Account

Lists by ID and deletes account contact relations.

List accounts

/rest/accounts

Parameters

Field Type Description
updatedAt String Filter that restricts the search result to accounts that were updated according to given filters.
Usage:
  • 'updatedAt=between:yyyy-mm-dd,yyyy-mm-dd'
  • 'updatedAt=eq:yyyy-mm-dd' (=)
  • 'updatedAt=gt:yyyy-mm-dd' (>)
  • 'updatedAt=gte:yyyy-mm-dd' (>=)
  • 'updatedAt=lt:yyyy-mm-dd' (<)
  • 'updatedAt=lte:yyyy-mm-dd' (<=)
  • Dates can also include the time. Example: 2017-03-08 13:24:17
  • Without including the time we will use 00:00:00 as default. Example: 2017-03-08 00:00:00
createdAt String Filter that restricts the search result to accounts that were created according to given filters.
Usage:
  • 'createdAt=between:yyyy-mm-dd,yyyy-mm-dd'
  • 'createdAt=eq:yyyy-mm-dd' (=)
  • 'createdAt=gt:yyyy-mm-dd' (>)
  • 'createdAt=gte:yyyy-mm-dd' (>=)
  • 'createdAt=lt:yyyy-mm-dd' (<)
  • 'createdAt=lte:yyyy-mm-dd' (<=)
  • Dates can also include the time. Example: 2017-03-08 13:24:17
  • Without including the time we will use 00:00:00 as default. Example: 2017-03-08 00:00:00
companyName String Filter that restricts the search result to accounts that have a company name according to given filters.
Usage:
  • 'companyName=like:expamle'
  • 'companyName=eq:example' (=)

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 Array List

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 account

/rest/accounts

Request

Field Type Description
companyName String The company name required
discountPercent Float The early payment discount in percent specified for the account optional
valuta Int The valuta date in days specified for the account optional
discountDays Int The early payment discount period in days specified for the account optional
timeForPaymentAllowedDays Int The payment due date in days specified for the account optional
{"number":"42FRL69RL","companyName":"plentymarkets GmbH","taxIdNumber":"15616511EV456","discountPercent":5,"valuta":10,"discountDays":5,"timeForPaymentAllowedDays":10,"salsesRepresentativeContactId":102,"userId":4}

Success 200

Field Type Description
id Int The ID of the account
number String The number of the account
companyName String The company name
taxIdNumber String The ID of the tax number
valuta Int The valuta date in days specified for the account
discountDays Int The early payment discount period in days specified for the account
discountPercent Float The early payment discount in percent specified for the account
timeForPaymentAllowedDays Int The payment due date in days specified for the account
salesRepresentativeContactId Int The contact ID of the sales representative
userId Int The ID of the account owner
deliveryTime Int The delivery time for the supplier
dealerMinOrderValue Float The minimum order value for the supplier
createdAt String|\Carbon The time the account was created as unix timestamp
updatedAt String|\Carbon The time the account was last updated as unix timestamp
{"id":112,"number":"42FRL69RL","companyName":"plentymarkets GmbH","taxIdNumber":"15616511EV456","valuta":10,"discountDays":5,"discountPercent":0.5,"timeForPaymentAllowedDays":10,"salsesRepresentativeContactId":102,"userId":4,"createdAt":"2014-04-09T23:18:24+02:00","updatedAt":"2016-07-22T23:00:36+02:00"}

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 account

Gets an account. The ID of the account must be specified.

/rest/accounts/{accountId}

Success 200

Field Type Description
id Int The ID of the account
number String The number of the account
companyName String The company name
taxIdNumber String The ID of the tax number
valuta Int The valuta date in days specified for the account
discountDays Int The early payment discount period in days specified for the account
discountPercent Float The early payment discount in percent specified for the account
timeForPaymentAllowedDays Int The payment due date in days specified for the account
salesRepresentativeContactId Int The contact ID of the sales representative
userId Int The ID of the account owner
deliveryTime Int The delivery time for the supplier
dealerMinOrderValue Float The minimum order value for the supplier
createdAt String|\Carbon The time the account was created as unix timestamp
updatedAt String|\Carbon The time the account was last updated as unix timestamp

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 account

Updates an account. The ID of the account must be specified.

/rest/accounts/{accountId}

Request

Field Type Description
companyName String The company name required
discountPercent Float The early payment discount in percent specified for the account optional
valuta Int The valuta date in days specified for the account optional
discountDays Int The early payment discount period in days specified for the account optional
timeForPaymentAllowedDays Int The payment due date in days specified for the account optional
{"number":"42FRL69RL","companyName":"plentymarkets GmbH","taxIdNumber":"15616511EV456","discountPercent":5,"valuta":10,"discountDays":5,"timeForPaymentAllowedDays":10,"salsesRepresentativeContactId":102,"userId":4}

Success 200

Field Type Description
id Int The ID of the account
number String The number of the account
companyName String The company name
taxIdNumber String The ID of the tax number
valuta Int The valuta date in days specified for the account
discountDays Int The early payment discount period in days specified for the account
discountPercent Float The early payment discount in percent specified for the account
timeForPaymentAllowedDays Int The payment due date in days specified for the account
salesRepresentativeContactId Int The contact ID of the sales representative
userId Int The ID of the account owner
deliveryTime Int The delivery time for the supplier
dealerMinOrderValue Float The minimum order value for the supplier
createdAt String|\Carbon The time the account was created as unix timestamp
updatedAt String|\Carbon The time the account was last updated as unix timestamp
{"id":112,"number":"42FRL69RL","companyName":"plentymarkets GmbH","taxIdNumber":"15616511EV456","valuta":10,"discountDays":5,"discountPercent":0.5,"timeForPaymentAllowedDays":10,"salsesRepresentativeContactId":102,"userId":4,"createdAt":"2014-04-09T23:18:24+02:00","updatedAt":"2016-07-22T23:00:36+02:00"}

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 account

Deletes an account. The ID of the account must be specified.

/rest/accounts/{accountId}

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.

List contacts

Lists contacts of the account. The ID of the account must be specified.

/rest/accounts/{accountId}/contacts

Success 200

Field Type Description
id Int The ID of the contact
externalId String The external ID of the contact
number String The number of the contact (previous customer number)
typeId Int The ID of the contact type
firstName String The first name of the contact
lastName String The last name of the contact
fullName String The full name of the contact. A concatenation of first and last name.
email String The private email address of the contact
secondaryEmail String The secondary private email address of the contact
gender String The gender of the contact
title String The title of the contact, e.g. a doctorate
formOfAddress String The form of address for the contact
newsletterAllowanceAt String|\Carbon The time the contact registered for the newsletter as unix timestamp
classId Int The ID of the contact class
blocked Int The blocked status of the contact. Contacts can be blocked for a specific client (store). Possible values:
  • 0 = not blocked
  • 1 = blocked
rating Int The rating of the contact. This rating is for internal use only. 5 red stars are for the worst and 5 yellow stars for the best rating. Possible values:
  • -5 = 5 red stars (worst rating)
  • -4 = 4 red stars
  • -3 = 3 red stars
  • -2 = 2 red stars
  • -1 = 1 red star
  • 0 = 5 grey stars, no rating saved for the contact
  • 1 = 1 yellow star
  • 2 = 2 yellow stars
  • 3 = 3 yellow stars
  • 4 = 4 yellow stars
  • 5 = 5 yellow stars (best rating)
bookAccount String The book account (debtor account) of the contact. An additional, separate number that generally corresponds to the customer number or the debtor number in your financial accounting.
lang String The language of the contact
referrerId Float The origin of the contact
plentyId Int The client (store) that is assigned to the contact
userId Int The owner ID of the contact
birthdayAt String|\Carbon The date of birth of the contact
lastLoginAt String|\Carbon The date of the last login of the contact
lastLoginAtTimestamp String|\Carbon The date of the last login of the contact
lastOrderAt String|\Carbon The date of the last order
createdAt String|\Carbon The date the contact was created
updatedAt String|\Carbon The date the contact was last updated
privatePhone String The private phone number of the contact
privateFax String The private fax number of the contact
privateMobile String The private mobile phone number of the contact
ebayName String The eBay account name of the contact
paypalEmail String The email address of the PayPal account of the contact
paypalPayerId String The PayPal payer id of the contact
klarnaPersonalId String The Klarna personal id of the contact
dhlPostIdent String The DHL PostIdent of the contact
forumUsername String The user name of the contact in the forum
forumGroupId String The ID of the forum group that is assigned to the contact
singleAccess String The access type of the contact
contactPerson String The contact person of the contact
marketplacePartner String The marketplace partner status of the contact
valuta Int The foreign currency of the contact
discountDays Int The early payment discount period in days specified for the account
discountPercent Float The early payment discount in percent specified for the account
timeForPaymentAllowedDays Int The payment due date in days specified for the account
salesRepresentativeContactId Int The salesRepresentative ID of the contact

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 an account contact releation. The ID of the account contact relation must be specified.

/rest/accounts/contact_relations/{accountContactRelationId}

Success 200

Field Type Description
id Int The ID of the account contact relation
accountId Int The ID of the foreign key account
contactId Int The ID of the foreign key contact
{"id":6,"accountId":2,"contactId":101}

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.

Deletes an account contact relation. The ID of the account contact relation must be specified.

/rest/accounts/contact_relations/{accountContactRelationId}

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.

Is this article helpful?

 

Thank you for your Feedback

you can close this field now!