Skip to main content

Assign Customer To Sale

PATCH {{baseUrl}}/sales/customers

Description

This API endpoint is used to assign a customer to a sale.

Request

  • Headers:

    • (Required) userId
    • (Required) tenantId
    • (Required) countryCode
    • Content-Type: application/json
    • Accept: */
  • URL: {{baseUrl}}/sales/customers

Request Body

{
"saleId": "<string>",
"customerId": "<string>",
"merchantId": "<string>",
"newCustomerRequest": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",`
"country": {
"code": "<string>",
"name": "<string>",
"currency": "<string>"
},
"state": {
"code": "<string>",
"name": "<string>"
}
}
}

Sample Request

curl --location -g --request PATCH '{{baseUrl}}/sales/customers' \
--header 'userId: <string>' \
--header 'tenantId: <string>' \
--header 'countryCode: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
"saleId": "<string>",
"customerId": "<string>",
"merchantId": "<string>",
"newCustomerRequest": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"country": {
"code": "<string>",
"name": "<string>",
"currency": "<string>"
},
"state": {
"code": "<string>",
"name": "<string>"
}
}
}'

Sample Response

{
"message": "<string>",
"data": {
"saleId": "<string>",
"customerId": "<string>"
},
"meta": {
"currentPage": "<long>",
"from": "<long>",
"to": "<long>",
"perPage": "<long>",
"total": "<long>",
"lastPage": "<long>"
}
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PATCH \ 
--url /sales/customers \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!