Customer Group Relations

Manage shipping customer groups

Retrieving customer-group relations

get

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


Required scopes

No specific scopes required

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

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

Site’s 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
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

  • shipping.shipping_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

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

Site’s 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's unique identifier.

groupIdstringOptional

Group's unique identifier.

Responses
201
Resource successfully created.
application/json
post
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.


Required scopes

No specific scopes are required.

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

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

Site’s unique identifier. A site is a specific shop.

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

customerIdstringRequired

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

Responses
200
Resource successfully retrieved.
application/json
get
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

  • shipping.shipping_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

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

Site’s unique identifier. A site is a specific shop.

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

customerIdstringRequired

Customer's 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's unique identifier.

groupIdstringOptional

Group's unique identifier.

Responses
200
Resource successfully updated.
put
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

  • shipping.shipping_manage

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

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

Site’s unique identifier. A site is a specific shop.

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

customerIdstringRequired

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

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

No content

Was this helpful?