Sales tax group

Store and customer sales tax group contains all tax codes any item could have that is sold within a specific store or to a specific customer. Sales tax groups are attached to customers, stores, vendors etc. When the tax is calculated for an item the tax codes in the intersection of this group and the tax group of the store/customer are used.

The salestaxgroup endpoint in LS One API allows management of sales tax groups. For managing the tax codes in the group, see taxcode endpoint.

Actions

GET 

Get sales tax group

GET 

Get all sales tax groups

POST 

Create a new sales tax group

PUT 

Update a sales tax group

DELETE 

Delete a sales tax group

POST 

Save sales tax group list

Properties

Field Data type Validation Description
id

string

Required

max. length = 20

Unique identifier of the sales tax group.
description string Required

max. length = 30

Description of the sales tax group
isForEU

boolean

-

Specifies if this tax group is used for transactions between countries in the European Union. Used by SAP Business One integration.

Examples

Get sales tax group

Returns details of a single sales tax group.

GET /api/salestaxgroup/{id}

Permissions

  • SalesTaxGroup:Read

For more information on authenticating to LS One APIs, see Authentication.

Request

curl -X 'GET' \
'https://lsoneapi.lsretail.com/api/salestaxgroup/TG0010' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer {authentication_token}'
Parameter Data type Validation Description
id string

Required

Unique identifier of the sales tax group

Response

{
  "id": "TG0010",
  "description": "Standard customer",
  "isForEU": false
}

Status codes

Code Text Description
200 Success Success
401 Unauthorized LS One API client did not provide a valid authentication token or it does not have permissions to read sales tax group(s)
404 Not Found The requested sales tax group was not found

Get all sales tax groups

Returns a list of all sales tax groups.

GET /api/salestaxgroup

Permissions

  • SalesTaxGroup:Read

For more information on authenticating to LS One APIs, see Authentication.

Request

curl -X 'GET' \
  'https://lsoneapi.lsretail.com/api/salestaxgroup' \
  -H 'accept: text/plain' \
 -H 'Authorization: Bearer {authentication_token}'

Response

[
	{
		"id": "TG0010",
		"description": "Standard customer",
		"isForEU": false
	},
	{
		"id": "TG0011",
		"description": "Without Tax",
		"isForEU": false
	},
	...
]

Status codes

Code Text Description
200 Success Success
401 Unauthorized LS One API client did not provide a valid authentication token or it does not have permissions to read sales tax group(s)
404 Not Found No sales tax groups found

Create a new sales tax group

Create a new sales tax group.

POST /api/salestaxgroup

To create a new sales tax group, the following fields are required:

  • Description

Permissions

  • SalesTaxGroup:Write

For more information on authenticating to LS One APIs, see Authentication.

Request

curl -X 'POST' \
  'https://lsoneapi.lsretail.com/api/salestaxgroup' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer {authorization_token}' \
  -H 'Content-Type: application/json' \
  -d '{
		  "description": "American tax group"
}'

Response

{
	  "id": "0-00000003",
	  "description": "American tax group",
	  "isForEU": false
}

Status codes

Code Text Description
200 Success Success
401 Unauthorized LS One API client did not provide a valid authentication token or it does not have permissions to write sales tax group(s)
400 Bad Request New sales tax group could not be created

Update a sales tax group

Updates an existing sales tax group.

PUT /api/salestaxgroup

To update an existing sales tax group, the following fields are required:

  • ID

  • Description

Permissions

  • SalesTaxGroup:Write

For more information on authenticating to LS One APIs, see Authentication.

Request

curl -X 'PUT' \
  'https://lsoneapi.lsretail.com/api/salestaxgroup' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer {authentication_token}' \
  -H 'Content-Type: application/json' \
  -d '{
		"id": "0-00000003",
		"description": "American tax group updated"
}'

Response

{
	  "id": "0-00000003",
	  "description": "American tax group updated",
	  "isForEU": false
}

Status codes

Code Text Description
200 Success Success
401 Unauthorized LS One API client did not provide a valid authentication token or it does not have permissions to write sales tax group(s)
400 Bad Request Sales tax group could not be updated
404 Not Found Sales tax group to be updated was not found

Delete a sales tax group

Delete an existing sales tax group.

DELETE /api/salestaxgroup/{id}

Permissions

  • SalesTaxGroup:Write

For more information on authenticating to LS One APIs, see Authentication.

Request

curl -X 'DELETE' \
  'https://lsoneapi.lsretail.com/api/salestaxgroup/0-00000003' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer {authentication_token}'
Parameter Data type Validation Description
id string

Required

The id of the sales tax group

Response

HTTP/1.1 204 No Content

Status codes

Code Text Description
200 Success Success
401 Unauthorized LS One API client did not provide a valid authentication token or it does not have permissions to read sales tax group(s)
404 Not Found The requested sales tax group was not found

Save a list of sales tax groups

Savesales tax group list.

POST /api/salestaxgroup/save-list

To save a list of sales tax groups, a list must be provided and each item must have the following fields:

  • Description

Permissions

  • SalesTaxGroup:Write

For more information on authenticating to LS One APIs, see Authentication.

Request

curl -X 'POST' \
  'https://lsoneapi.lsretail.com/api/salestaxgroup/save-list' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer {authorization_token}' \
  -H 'Content-Type: application/json' \
  -d '	[
			{
				"description": "Sales tax group 1"
			},
			{
				"description": "Sales tax group 2"
			}
		]'

Response

{
		HTTP/1.1 204 No Content
}

Status codes

Code Text Description
200 Success Success
401 Unauthorized LS One API client did not provide a valid authentication token or it does not have permissions to write sales tax group(s)
400 Bad Request Sales tax groups could not be created