Customer Group Relations

Manage shipping customer groups

Retrieving customer-group relations

get

Retrieves a list of customer-group relations for the specified site.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
  • : Needed to manage shipping settings.
  • : Needed to read shipping settings.
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
sitestringRequired

Site unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

Responses
200

Resource successfully retrieved.

application/json
get
/shipping/{tenant}/{site}/cgrelations
GET /shipping/{tenant}/{site}/cgrelations HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "customerId": "C001",
    "groupId": "group1"
  },
  {
    "customerId": "C002",
    "groupId": "group2"
  }
]

Creating a customer-group relation

post

Creates a new customer-group relation for the specified site.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage shipping settings.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
sitestringRequired

Site unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

Body

Customer-group relation allows to assign user for specific group.

customerIdstringOptional

Customer unique identifier.

groupIdstringOptional

Group's unique identifier.

Responses
post
/shipping/{tenant}/{site}/cgrelations
POST /shipping/{tenant}/{site}/cgrelations HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "customerId": "C001",
  "groupId": "group1"
}
{
  "id": "group1"
}

Retrieving a customer's customer-group relations

get

Retrieves customer-group relations for the specified customer.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
  • : Needed to manage shipping settings.
  • : Needed to read shipping settings.
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
sitestringRequired

Site unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

customerIdstringRequired

Customer unique identifier generated when the customer's account is created through the Customer Service.

Responses
200

Resource successfully retrieved.

application/json
get
/shipping/{tenant}/{site}/cgrelations/{customerId}
GET /shipping/{tenant}/{site}/cgrelations/{customerId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "customerId": "C001",
  "groupId": "group1"
}

Updating a customer's customer-group relations

put

Updates the customer-group relation for the specified customer.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage shipping settings.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
sitestringRequired

Site unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

customerIdstringRequired

Customer unique identifier generated when the customer's account is created through the Customer Service.

Body

Customer-group relation allows to assign user for specific group.

customerIdstringOptional

Customer unique identifier.

groupIdstringOptional

Group's unique identifier.

Responses
200

Resource successfully updated.

No content

put
/shipping/{tenant}/{site}/cgrelations/{customerId}
PUT /shipping/{tenant}/{site}/cgrelations/{customerId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "customerId": "C001",
  "groupId": "group1"
}

No content

Deleting a customer's customer-group relation

delete

Deletes the customer-group relation for the specified customer.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage shipping settings.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
sitestringRequired

Site unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

customerIdstringRequired

Customer unique identifier generated when the customer's account is created through the Customer Service.

Responses
delete
/shipping/{tenant}/{site}/cgrelations/{customerId}
DELETE /shipping/{tenant}/{site}/cgrelations/{customerId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Last updated

Was this helpful?