Customer

There are several Customer activities around Wish-list, Memberships, Subscriptions, Returns, Passwords, Newsletters, GDPR and Orders. This page covers Customer endpoints creatd to manage these activities programmatically

POST/api/v2/commerce/customer

Get users based on username, email, phone, name.

This endpoint allows you to get users based on username, email, phone, name.

Developers - API Operations:

OperationEndpointResponse
Get Users/api/v2/commerce/customerGet users based on username, email, phone, name.

Required attributes

  • Name
    model
    Type
    model
    Description

    Object containing the values of username, email, phone, name

Model attributes

  • Name
    userName
    Type
    string
    Description

    Username of the user

  • Name
    email
    Type
    string
    Description

    Email id of the user

  • Name
    phone
    Type
    string
    Description

    Phone number of the user

  • Name
    firstname
    Type
    string
    Description

    First name of the user

  • Name
    lastname
    Type
    string
    Description

    Last name of the user

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    array
    Description

    Result of the response

  • Name
    businessType
    Type
    string
    Description

    Business type of the company

  • Name
    registeredNumber
    Type
    string
    Description

    Registered number of the company

  • Name
    priceListId
    Type
    string
    Description

    Price list Id used to identify the price list

  • Name
    companyUserRole
    Type
    string
    Description

    User role of the company

  • Name
    customerGroupId
    Type
    string
    Description

    CustomerGroupId used to identify Customer groups

  • Name
    companyId
    Type
    string
    Description

    Company Id to identify the company

  • Name
    id
    Type
    string
    Description

    id to identify the user address

  • Name
    title
    Type
    string
    Description

    Title of the user e.g. Miss./Mrs./Mr.

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    address1
    Type
    string
    Description

    Address Line 1 provided by the user

  • Name
    address2
    Type
    string
    Description

    Address Line 2 provided by the user

  • Name
    address3
    Type
    string
    Description

    Address Line 3 provided by the user

  • Name
    city
    Type
    string
    Description

    City name provided by the user

  • Name
    state
    Type
    string
    Description

    State name provided by the user

  • Name
    country
    Type
    string
    Description

    Country name provided by the user

  • Name
    countryCode
    Type
    string
    Description

    Country code provided by the user

  • Name
    postCode
    Type
    string
    Description

    Post code provided by the user

  • Name
    phoneNo
    Type
    string
    Description

    Phone number of the user

  • Name
    companyName
    Type
    string
    Description

    Name of the company provided by the user

  • Name
    address
    Type
    object
    Description

    Address of the company

  • Name
    username
    Type
    string
    Description

    Username of the user

  • Name
    email
    Type
    string
    Description

    Email of the company

  • Name
    telephone
    Type
    string
    Description

    Telephone number of the user

  • Name
    mobile
    Type
    string
    Description

    Mobile number of the user

  • Name
    gender
    Type
    string
    Description

    Gender of the user

  • Name
    password
    Type
    string
    Description

    Password of the user

  • Name
    nickName
    Type
    string
    Description

    Nick name of the user

  • Name
    dayOfBirth
    Type
    string
    Description

    Day of birth of the user

  • Name
    monthOfBirth
    Type
    string
    Description

    Month of birth of the user

  • Name
    yearOfBirth
    Type
    string
    Description

    Year of birth of the user

  • Name
    birthDate
    Type
    string
    Description

    Birth date of the user

  • Name
    newsLetterSubscribed
    Type
    boolean
    Description

    Flag to check if newsletter is subscribed by the user

  • Name
    userSourceType
    Type
    number
    Description

    Source type of the user e.g. 1

  • Name
    referralType
    Type
    string
    Description

    Referral type of the user

  • Name
    userReferrer
    Type
    string
    Description

    Referrer of the the user

  • Name
    notifyByEmail
    Type
    boolean
    Description

    Flag to check if user wants to be notified by email

  • Name
    notifyBySMS
    Type
    boolean
    Description

    Flag to check if user wants to be notified by SMS

  • Name
    notifyByPost
    Type
    boolean
    Description

    Flag to check if user wants to be notified by Post

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    isDefaultDelivery
    Type
    boolean
    Description

    Flag to check if the addresss is default delivery address

  • Name
    isDefaultForSubscription
    Type
    boolean
    Description

    Flag to check if the address is default

  • Name
    isDefaultBilling
    Type
    boolean
    Description

    Flag to check if the address is default billing address

  • Name
    isDefault
    Type
    boolean
    Description

    Flag to check if this shipping method is the default shipping method

  • Name
    fax
    Type
    string
    Description

    Fax number of the company

  • Name
    addressType
    Type
    number
    Description

    Type of address

  • Name
    companyWebsite
    Type
    string
    Description

    Company website url

  • Name
    tradingCurrency
    Type
    string
    Description

    Trading currency for the region

  • Name
    localTextKey
    Type
    string
    Description

    local text key for the region

  • Name
    created
    Type
    string
    Description

    Time when the quote was created

  • Name
    lastUpdated
    Type
    string
    Description

    The date and time when the quote was last updated

  • Name
    createdBy
    Type
    string
    Description

    Name of the user who created of the quote

  • Name
    lastUpdatedBy
    Type
    string
    Description

    Name of the user who last updated the quote

  • Name
    ipAddress
    Type
    string
    Description

    Ip address used to create the quote

  • Name
    orgId
    Type
    string
    Description

    Organization Id of the quote

  • Name
    branchId
    Type
    string
    Description

    Branch Id of the company that created the quote

  • Name
    domainId
    Type
    string
    Description

    Domain Id of the company that created the quote

  • Name
    totalRecord
    Type
    number
    Description

    Total number of records

  • Name
    currentPage
    Type
    number
    Description

    Current page number

  • Name
    pageSize
    Type
    number
    Description

    Size of the page

  • Name
    externalStatus
    Type
    string
    Description

    External status of the quote

  • Name
    isRegistered
    Type
    boolean
    Description

    Flag to check if the user is registered

  • Name
    sourceProcess
    Type
    string
    Description

    Source process of the company

  • Name
    isWelcomeEmailSent
    Type
    boolean
    Description

    Flag to check if the Welcome email is sent

  • Name
    isCreatedByAdmin
    Type
    boolean
    Description

    Flag to check if the quote is created by the admin

  • Name
    hasSubscription
    Type
    boolean
    Description

    Flag to check if the user has a subscription

  • Name
    hasMembership
    Type
    boolean
    Description

    Flag to check if the user has a membership

  • Name
    externalAccountingId
    Type
    string
    Description

    Id used to identify External accounting

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    userId
    Type
    string
    Description

    User id used to identify the user

  • Name
    isPromptPasswordChange
    Type
    boolean
    Description

    Flag to check if the prompt to change the password has been initiated

  • Name
    isForcePasswordChange
    Type
    boolean
    Description

    Flag to check if force password change has been initiated

  • Name
    isConvertCompanyRequest
    Type
    boolean
    Description

    Flag to check if the company request must be converted

  • Name
    hasSubscribed
    Type
    boolean
    Description

    Flag to check if the user has already subscribed to a subscription

Request

POST
/api/v2/commerce/customer
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/customer' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597' \
--data-urlencode 'email=' \
--data-urlencode 'phone=' \
--data-urlencode 'username=vikram' \
--data-urlencode 'firstname=' \
--data-urlencode 'lastname='

Response

{
"statusCode": 307,
"status": "adipisicing ea pariatur nulla",
"errors": [
    "reprehenderit commodo",
    "ex aliquip et"
],
"success": false,
"message": "commodo aliquip",
"messageCode": "in amet ut elit nulla",
"result": [
    {
        "userId": "00000000-0000-0000-0000-000000000000",
        "username": "culpa occaecat adipisicing",
        "firstName": "magna elit in commodo sit",
        "lastName": "al",
        "email": "cupidatat",
        "title": "ex non dolore velit",
        "telephone": "anim sit id",
        "mobile": "amet",
        "gender": "in ut",
        "password": "tempor amet exerc",
        "nickName": "ad enim cupidatat",
        "dayOfBirth": "Ut in",
        "monthOfBirth": "exercitation voluptate",
        "yearOfBirth": "magna anim",
        "birthDate": "consectetur occaecat sint",
        "postCode": "dolor nulla sit reprehenderit ip",
        "newsLetterSubscribed": true,
        "userSourceType": 7,
        "referralType": "Facebook",
        "userReferrer": "amet",
        "address": {
            "addressType": -3823280,
            "companyWebsite": "ut ullamco eiusmod commodo",
            "tradingCurrency": "esse occaecat",
            "userId": "00000000-0000-0000-0000-000000000000",
            "title": "consequat cupidatat voluptate tempor",
            "firstName": "et est",
            "lastName": "nis",
            "address1": "est reprehenderit officia aliqua aliquip",
            "address2": "pariatur in quis",
            "address3": "commodo dolor aliquip est",
            "city": "laboris pariatur ut sint ad",
            "state": "do deserunt nulla commodo",
            "country": "ut irure nostrud in",
            "countryCode": "sunt",
            "postCode": "ipsum deserunt ea culpa ut",
            "phoneNo": "id aute",
            "isDefaultDelivery": true,
            "isDefaultBilling": false,
            "isDefault": true,
            "isDefaultForSubscription": true,
            "companyName": "aliquip Excepteur in culpa",
            "companyId": "Excepteur ut Lorem consectetur irure",
            "fax": "ad ipsum ",
            "email": "in laborum est fugiat",
            "id": 77371244,
            "recordId": "00000000-0000-0000-0000-000000000000",
            "localTextKey": "sed non voluptate irure",
            "created": "1953-07-19T02:53:33.973Z",
            "lastUpdated": "1951-09-10T13:57:33.651Z",
            "createdBy": "aute enim amet deserunt",
            "lastUpdatedBy": "dolor",
            "ipAddress": "tempor ad dolore adipisicing",
            "orgId": "00000000-0000-0000-0000-000000000000",
            "branchId": "00000000-0000-0000-0000-000000000000",
            "domainId": "00000000-0000-0000-0000-000000000000",
            "totalRecord": 83871333,
            "currentPage": -37079961,
            "pageSize": 20449622,
            "externalStatus": "labore"
        },
        "companyId": "nisi magna",
        "companyName": "Lorem in proident",
        "businessType": "incididunt ullamco esse",
        "registeredNumber": "qui in consectetur ut eiusmod",
        "priceListId": "00000000-0000-0000-0000-000000000000",
        "companyUserRole": 2,
        "isRegistered": true,
        "notifyByEmail": false,
        "notifyBySMS": false,
        "notifyByPost": false,
        "sourceProcess": "officia velit nulla",
        "isWelcomeEmailSent": false,
        "isPromptPasswordChange": false,
        "isForcePasswordChange": false,
        "isCreatedByAdmin": true,
        "isConvertCompanyRequest": true,
        "hasSubscription": true,
        "hasMembership": false,
        "externalAccountingId": "eu",
        "registrationSource": "quis adipisicing dolore",
        "hasSubscribed": false,
        "customerGroupId": "00000000-0000-0000-0000-000000000000"
    },
    {
        "userId": "00000000-0000-0000-0000-000000000000",
        "username": "ad veniam aliqua eu cillum",
        "firstName": "pr",
        "lastName": "culpa pariatur occaecat qui",
        "email": "ea amet minim",
        "title": "incididunt exercitation eu irure voluptate",
        "telephone": "consectetur et amet",
        "mobile": "ex occaecat dolor",
        "gender": "id amet in",
        "password": "mollit proident ad",
        "nickName": "cu",
        "dayOfBirth": "proident nulla",
        "monthOfBirth": "sunt consequat ipsum",
        "yearOfBirth": "culpa tempor",
        "birthDate": "eu id",
        "postCode": "laborum Ut id in",
        "newsLetterSubscribed": true,
        "userSourceType": 1,
        "referralType": "Store",
        "userReferrer": "ad anim",
        "address": {
            "addressType": 94092947,
            "companyWebsite": "veniam dolor exercitation",
            "tradingCurrency": "aliqua in",
            "userId": "00000000-0000-0000-0000-000000000000",
            "title": "cupidatat labore",
            "firstName": "la",
            "lastName": "dolore ea sint proident aliqua",
            "address1": "voluptate sunt qui",
            "address2": "ut aliquip officia",
            "address3": "officia a",
            "city": "voluptate non mollit do",
            "state": "esse incididunt id nulla",
            "country": "sit",
            "countryCode": "nostrud tempor cupidatat do",
            "postCode": "non Ut veniam nulla",
            "phoneNo": "cillum ullamco",
            "isDefaultDelivery": false,
            "isDefaultBilling": false,
            "isDefault": true,
            "isDefaultForSubscription": true,
            "companyName": "eiusmod quis sunt",
            "companyId": "labore sed",
            "fax": "adipisicing ex laboris d",
            "email": "enim ad dolore aliquip",
            "id": -36421152,
            "recordId": "00000000-0000-0000-0000-000000000000",
            "localTextKey": "dolore culpa labore enim",
            "created": "1978-09-06T06:15:36.033Z",
            "lastUpdated": "1982-11-26T09:59:15.938Z",
            "createdBy": "velit deserunt",
            "lastUpdatedBy": "in ut proident",
            "ipAddress": "ut labore nisi minim reprehenderit",
            "orgId": "00000000-0000-0000-0000-000000000000",
            "branchId": "00000000-0000-0000-0000-000000000000",
            "domainId": "00000000-0000-0000-0000-000000000000",
            "totalRecord": -19094563,
            "currentPage": -10011534,
            "pageSize": 46446667,
            "externalStatus": "et aute"
        },
        "companyId": "consectetur min",
        "companyName": "ipsum",
        "businessType": "aliqua sint consectetur enim",
        "registeredNumber": "officia exercitation nisi et ipsum",
        "priceListId": "00000000-0000-0000-0000-000000000000",
        "companyUserRole": 2,
        "isRegistered": true,
        "notifyByEmail": true,
        "notifyBySMS": true,
        "notifyByPost": false,
        "sourceProcess": "dolor ut",
        "isWelcomeEmailSent": false,
        "isPromptPasswordChange": false,
        "isForcePasswordChange": true,
        "isCreatedByAdmin": true,
        "isConvertCompanyRequest": false,
        "hasSubscription": true,
        "hasMembership": true,
        "externalAccountingId": "minim magna",
        "registrationSource": "mollit",
        "hasSubscribed": true,
        "customerGroupId": "00000000-0000-0000-0000-000000000000"
    }
]
}

POST/api/v2/commerce/customer/:email/exists

Get users based on email.

This endpoint allows you to get users based on email.

Developers - API Operations:

OperationEndpointResponse
Get Users/api/v2/commerce/customer/:email/existsGet users based on email.

Required attributes

  • Name
    email
    Type
    string
    Description

    Email Id of the user to get user details

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    array
    Description

    Result of the response

  • Name
    businessType
    Type
    string
    Description

    Business type of the company

  • Name
    registeredNumber
    Type
    string
    Description

    Registered number of the company

  • Name
    priceListId
    Type
    string
    Description

    Price list Id used to identify the price list

  • Name
    companyUserRole
    Type
    string
    Description

    User role of the company

  • Name
    customerGroupId
    Type
    string
    Description

    CustomerGroupId used to identify Customer groups

  • Name
    companyId
    Type
    string
    Description

    Company Id to identify the company

  • Name
    id
    Type
    string
    Description

    id to identify the user address

  • Name
    title
    Type
    string
    Description

    Title of the user e.g. Miss./Mrs./Mr.

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    postCode
    Type
    string
    Description

    Post code provided by the user

  • Name
    companyName
    Type
    string
    Description

    Name of the company provided by the user

  • Name
    address
    Type
    object
    Description

    Address of the company

  • Name
    username
    Type
    string
    Description

    Username of the user

  • Name
    email
    Type
    string
    Description

    Email of the company

  • Name
    telephone
    Type
    string
    Description

    Telephone number of the user

  • Name
    mobile
    Type
    string
    Description

    Mobile number of the user

  • Name
    gender
    Type
    string
    Description

    Gender of the user

  • Name
    password
    Type
    string
    Description

    Password of the user

  • Name
    nickName
    Type
    string
    Description

    Nick name of the user

  • Name
    dayOfBirth
    Type
    string
    Description

    Day of birth of the user

  • Name
    monthOfBirth
    Type
    string
    Description

    Month of birth of the user

  • Name
    yearOfBirth
    Type
    string
    Description

    Year of birth of the user

  • Name
    birthDate
    Type
    string
    Description

    Birth date of the user

  • Name
    newsLetterSubscribed
    Type
    boolean
    Description

    Flag to check if newsletter is subscribed by the user

  • Name
    userSourceType
    Type
    number
    Description

    Source type of the user e.g. 1

  • Name
    referralType
    Type
    string
    Description

    Referral type of the user

  • Name
    userReferrer
    Type
    string
    Description

    Referrer of the the user

  • Name
    notifyByEmail
    Type
    boolean
    Description

    Flag to check if user wants to be notified by email

  • Name
    notifyBySMS
    Type
    boolean
    Description

    Flag to check if user wants to be notified by SMS

  • Name
    notifyByPost
    Type
    boolean
    Description

    Flag to check if user wants to be notified by Post

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    isRegistered
    Type
    boolean
    Description

    Flag to check if the user is registered

  • Name
    sourceProcess
    Type
    string
    Description

    Source process of the company

  • Name
    isWelcomeEmailSent
    Type
    boolean
    Description

    Flag to check if the Welcome email is sent

  • Name
    isCreatedByAdmin
    Type
    boolean
    Description

    Flag to check if the quote is created by the admin

  • Name
    hasSubscription
    Type
    boolean
    Description

    Flag to check if the user has a subscription

  • Name
    hasMembership
    Type
    boolean
    Description

    Flag to check if the user has a membership

  • Name
    externalAccountingId
    Type
    string
    Description

    Id used to identify External accounting

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    userId
    Type
    string
    Description

    User id used to identify the user

  • Name
    isPromptPasswordChange
    Type
    boolean
    Description

    Flag to check if the prompt to change the password has been initiated

  • Name
    isForcePasswordChange
    Type
    boolean
    Description

    Flag to check if force password change has been initiated

  • Name
    isConvertCompanyRequest
    Type
    boolean
    Description

    Flag to check if the company request must be converted

  • Name
    hasSubscribed
    Type
    boolean
    Description

    Flag to check if the user has already subscribed to a subscription

Request

POST
/api/v2/commerce/customer/:email/exists
curl --location --request POST 'https://api20.bettercommerce.io/api/v2/commerce/customer/abc@abc.com/exists' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597;
ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'

Response

{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": null,
"messageCode": null,
"result": [
    {
        "userId": "79db110c-e22d-4b26-b565-ae530043dea1",
        "username": null,
        "firstName": "ABC",
        "lastName": "XYZ",
        "email": "abc@abc.com",
        "title": null,
        "telephone": null,
        "mobile": null,
        "gender": null,
        "password": null,
        "nickName": null,
        "dayOfBirth": null,
        "monthOfBirth": null,
        "yearOfBirth": null,
        "birthDate": null,
        "postCode": null,
        "newsLetterSubscribed": false,
        "userSourceType": 1,
        "referralType": "Direct",
        "userReferrer": null,
        "address": null,
        "companyId": "00000000-0000-0000-0000-000000000000",
        "companyName": null,
        "businessType": null,
        "registeredNumber": null,
        "priceListId": "00000000-0000-0000-0000-000000000000",
        "companyUserRole": 0,
        "isRegistered": true,
        "notifyByEmail": false,
        "notifyBySMS": false,
        "notifyByPost": false,
        "sourceProcess": null,
        "isWelcomeEmailSent": false,
        "isPromptPasswordChange": false,
        "isForcePasswordChange": false,
        "isCreatedByAdmin": false,
        "isConvertCompanyRequest": false,
        "hasSubscription": false,
        "hasMembership": false,
        "externalAccountingId": null,
        "registrationSource": null,
        "hasSubscribed": false,
        "customerGroupId": "00000000-0000-0000-0000-000000000000"
    }
]
}

POST/api/v2/commerce/customer/authenticate

Authenticate user.

This endpoint allows you to Authenticate user based on email and password.

Developers - API Operations:

OperationEndpointResponse
Authenticate Users/api/v2/commerce/customer/authenticateAuthenticate user based on Email and Password.

Required attributes

  • Name
    model
    Type
    model
    Description

    An object containing the username and password to authenticate the user

Model attributes

  • Name
    username
    Type
    string
    Description

    Email id of the user

  • Name
    password
    Type
    string
    Description

    Password of the user

Response Properties - OK

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    array
    Description

    Result of the response

  • Name
    businessType
    Type
    string
    Description

    Business type of the company

  • Name
    registeredNumber
    Type
    string
    Description

    Registered number of the company

  • Name
    priceListId
    Type
    string
    Description

    Price list Id used to identify the price list

  • Name
    companyUserRole
    Type
    string
    Description

    User role of the company

  • Name
    customerGroupId
    Type
    string
    Description

    CustomerGroupId used to identify Customer groups

  • Name
    companyId
    Type
    string
    Description

    Company Id to identify the company

  • Name
    id
    Type
    string
    Description

    id to identify the user address

  • Name
    title
    Type
    string
    Description

    Title of the user e.g. Miss./Mrs./Mr.

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    postCode
    Type
    string
    Description

    Post code provided by the user

  • Name
    companyName
    Type
    string
    Description

    Name of the company provided by the user

  • Name
    address
    Type
    object
    Description

    Address of the company

  • Name
    username
    Type
    string
    Description

    Username of the user

  • Name
    email
    Type
    string
    Description

    Email of the company

  • Name
    telephone
    Type
    string
    Description

    Telephone number of the user

  • Name
    mobile
    Type
    string
    Description

    Mobile number of the user

  • Name
    gender
    Type
    string
    Description

    Gender of the user

  • Name
    password
    Type
    string
    Description

    Password of the user

  • Name
    nickName
    Type
    string
    Description

    Nick name of the user

  • Name
    dayOfBirth
    Type
    string
    Description

    Day of birth of the user

  • Name
    monthOfBirth
    Type
    string
    Description

    Month of birth of the user

  • Name
    yearOfBirth
    Type
    string
    Description

    Year of birth of the user

  • Name
    birthDate
    Type
    string
    Description

    Birth date of the user

  • Name
    newsLetterSubscribed
    Type
    boolean
    Description

    Flag to check if newsletter is subscribed by the user

  • Name
    userSourceType
    Type
    number
    Description

    Source type of the user e.g. 1

  • Name
    referralType
    Type
    string
    Description

    Referral type of the user

  • Name
    userReferrer
    Type
    string
    Description

    Referrer of the the user

  • Name
    notifyByEmail
    Type
    boolean
    Description

    Flag to check if user wants to be notified by email

  • Name
    notifyBySMS
    Type
    boolean
    Description

    Flag to check if user wants to be notified by SMS

  • Name
    notifyByPost
    Type
    boolean
    Description

    Flag to check if user wants to be notified by Post

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    isRegistered
    Type
    boolean
    Description

    Flag to check if the user is registered

  • Name
    sourceProcess
    Type
    string
    Description

    Source process of the company

  • Name
    isWelcomeEmailSent
    Type
    boolean
    Description

    Flag to check if the Welcome email is sent

  • Name
    isCreatedByAdmin
    Type
    boolean
    Description

    Flag to check if the quote is created by the admin

  • Name
    hasSubscription
    Type
    boolean
    Description

    Flag to check if the user has a subscription

  • Name
    hasMembership
    Type
    boolean
    Description

    Flag to check if the user has a membership

  • Name
    externalAccountingId
    Type
    string
    Description

    Id used to identify External accounting

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    userId
    Type
    string
    Description

    User id used to identify the user

  • Name
    isPromptPasswordChange
    Type
    boolean
    Description

    Flag to check if the prompt to change the password has been initiated

  • Name
    isForcePasswordChange
    Type
    boolean
    Description

    Flag to check if force password change has been initiated

  • Name
    isConvertCompanyRequest
    Type
    boolean
    Description

    Flag to check if the company request must be converted

  • Name
    hasSubscribed
    Type
    boolean
    Description

    Flag to check if the user has already subscribed to a subscription

Response Properties - NOT OK

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    boolean
    Description

    Result of the response

Request

POST
/api/v2/commerce/customer/authenticate
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/customer/authenticate' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597' \
--data-urlencode 'username=abc@abc.com' \
--data-urlencode 'password=abcd1234'

Response - OK

{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": null,
"messageCode": null,
"result": {
    "userId": "79db110c-e22d-4b26-b565-ae530043dea1",
    "username": "abc@abc.com",
    "firstName": "ABC",
    "lastName": "XYZ",
    "email": "abc@abc.com",
    "title": null,
    "telephone": "",
    "mobile": "",
    "gender": "",
    "nickName": null,
    "dayOfBirth": "0",
    "monthOfBirth": "0",
    "yearOfBirth": "0",
    "birthDate": null,
    "postCode": null,
    "newsLetterSubscribed": false,
    "userSourceType": 1,
    "referralType": "Direct",
    "userReferrer": null,
    "address": null,
    "companyId": "00000000-0000-0000-0000-000000000000",
    "companyName": null,
    "businessType": null,
    "registeredNumber": null,
    "priceListId": "00000000-0000-0000-0000-000000000000",
    "companyUserRole": 0,
    "isRegistered": true,
    "notifyByEmail": false,
    "notifyBySMS": false,
    "notifyByPost": false,
    "sourceProcess": null,
    "isWelcomeEmailSent": false,
    "isPromptPasswordChange": false,
    "isForcePasswordChange": false,
    "isCreatedByAdmin": false,
    "isConvertCompanyRequest": false,
    "hasSubscription": false,
    "hasMembership": false,
    "externalAccountingId": null,
    "registrationSource": null,
    "hasSubscribed": false,
    "customerGroupId": "00000000-0000-0000-0000-000000000000"
}
}

Response - NOT OK

{
    "statusCode": 401,
    "status": "Unauthorized",
    "errors": [],
    "success": true,
    "message": null,
    "messageCode": null,
    "result": null
}

POST/api/v2/commerce/customer/create

Customer Register.

This endpoint allows you to register new customers.

Developers - API Operations:

OperationEndpointResponse
Register Users/api/v2/commerce/customer/createCustomer Register.

Required attributes

  • Name
    mode
    Type
    model
    Description

    Object containing the details required to create a new user

Model attributes

  • Name
    id
    Type
    string
    Description

    id to identify the user address

  • Name
    title
    Type
    string
    Description

    Title of the user e.g. Miss./Mrs./Mr.

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    postCode
    Type
    string
    Description

    Post code provided by the user

  • Name
    username
    Type
    string
    Description

    Username of the user

  • Name
    telephone
    Type
    string
    Description

    Telephone number of the user

  • Name
    mobile
    Type
    string
    Description

    Mobile number of the user

  • Name
    gender
    Type
    string
    Description

    Gender of the user

  • Name
    password
    Type
    string
    Description

    Password of the user

  • Name
    nickName
    Type
    string
    Description

    Nick name of the user

  • Name
    dayOfBirth
    Type
    string
    Description

    Day of birth of the user

  • Name
    monthOfBirth
    Type
    string
    Description

    Month of birth of the user

  • Name
    yearOfBirth
    Type
    string
    Description

    Year of birth of the user

  • Name
    birthDate
    Type
    string
    Description

    Birth date of the user

  • Name
    newsLetterSubscribed
    Type
    boolean
    Description

    Flag to check if newsletter is subscribed by the user

  • Name
    userSourceType
    Type
    number
    Description

    Source type of the user e.g. 1

  • Name
    referralType
    Type
    string
    Description

    Referral type of the user

  • Name
    userReferrer
    Type
    string
    Description

    Referrer of the the user

  • Name
    notifyByEmail
    Type
    boolean
    Description

    Flag to check if user wants to be notified by email

  • Name
    notifyBySMS
    Type
    boolean
    Description

    Flag to check if user wants to be notified by SMS

  • Name
    notifyByPost
    Type
    boolean
    Description

    Flag to check if user wants to be notified by Post

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    object
    Description

    Result of the response

  • Name
    recordId
    Type
    string
    Description

    RecordId of the record created

  • Name
    id
    Type
    number
    Description

    Id to identify the basket

  • Name
    isValid
    Type
    boolean
    Description

    Flag to check validity of the response

Request

POST
/api/v2/commerce/customer/create
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/customer/create' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597' \
--data-urlencode 'username=dolore ex qui' \
--data-urlencode 'firstName=esse sint' \
--data-urlencode 'lastName=labore fugiat' \
--data-urlencode 'email=est tempor' \
--data-urlencode 'title=sint ullamco' \
--data-urlencode 'telephone=ut reprehenderit' \
--data-urlencode 'mobile=dolor incididunt ullamco' \
--data-urlencode 'gender=est' \
--data-urlencode 'password=do Excepteur nulla commodo' \
--data-urlencode 'nickName=magna' \
--data-urlencode 'dayOfBirth=reprehenderit nulla amet ullamco' \
--data-urlencode 'monthOfBirth=nisi velit' \
--data-urlencode 'yearOfBirth=irure officia' \
--data-urlencode 'birthDate=ipsum' \
--data-urlencode 'postCode=sint' \
--data-urlencode 'newsLetterSubscribed=false' \
--data-urlencode 'userSourceType=NaN' \
--data-urlencode 'referralType=Webgains' \
--data-urlencode 'userReferrer=Excepteur' \
--data-urlencode 'companyName=elit' \
--data-urlencode 'notifyByEmail=false' \
--data-urlencode 'notifyBySMS=true' \
--data-urlencode 'notifyByPost=true' \
--data-urlencode 'registrationSource=dolor reprehe'

Response

{
"statusCode": null,
"status": "est anim",
"errors": [
    "anim",
    "Excepteur commodo"
],
"success": false,
"message": "qui elit aliqua Duis",
"messageCode": "officia tempor sint et",
"result": {
    "recordId": "00000000-0000-0000-0000-000000000000",
    "id": -60406320,
    "isValid": true
}
}

POST/api/v2/commerce/customer/:sessionId/ghostuser

Ghost login as user without knowing password.

This endpoint allows you to ghost login as user without knowing password.

Developers - API Operations:

OperationEndpointResponse
Login Users/api/v2/commerce/customer/:sessionId/ghostuserGhost login as user without knowing password.

Required attributes

  • Name
    sessionId
    Type
    string
    Description

    Id used to identify the current session

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    array
    Description

    Result of the response

  • Name
    businessType
    Type
    string
    Description

    Business type of the company

  • Name
    registeredNumber
    Type
    string
    Description

    Registered number of the company

  • Name
    priceListId
    Type
    string
    Description

    Price list Id used to identify the price list

  • Name
    companyUserRole
    Type
    string
    Description

    User role of the company

  • Name
    customerGroupId
    Type
    string
    Description

    CustomerGroupId used to identify Customer groups

  • Name
    companyId
    Type
    string
    Description

    Company Id to identify the company

  • Name
    id
    Type
    string
    Description

    id to identify the user address

  • Name
    title
    Type
    string
    Description

    Title of the user e.g. Miss./Mrs./Mr.

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    address1
    Type
    string
    Description

    Address Line 1 provided by the user

  • Name
    address2
    Type
    string
    Description

    Address Line 2 provided by the user

  • Name
    address3
    Type
    string
    Description

    Address Line 3 provided by the user

  • Name
    city
    Type
    string
    Description

    City name provided by the user

  • Name
    state
    Type
    string
    Description

    State name provided by the user

  • Name
    country
    Type
    string
    Description

    Country name provided by the user

  • Name
    countryCode
    Type
    string
    Description

    Country code provided by the user

  • Name
    postCode
    Type
    string
    Description

    Post code provided by the user

  • Name
    phoneNo
    Type
    string
    Description

    Phone number of the user

  • Name
    companyName
    Type
    string
    Description

    Name of the company provided by the user

  • Name
    address
    Type
    object
    Description

    Address of the company

  • Name
    username
    Type
    string
    Description

    Username of the user

  • Name
    email
    Type
    string
    Description

    Email of the company

  • Name
    telephone
    Type
    string
    Description

    Telephone number of the user

  • Name
    mobile
    Type
    string
    Description

    Mobile number of the user

  • Name
    gender
    Type
    string
    Description

    Gender of the user

  • Name
    password
    Type
    string
    Description

    Password of the user

  • Name
    nickName
    Type
    string
    Description

    Nick name of the user

  • Name
    dayOfBirth
    Type
    string
    Description

    Day of birth of the user

  • Name
    monthOfBirth
    Type
    string
    Description

    Month of birth of the user

  • Name
    yearOfBirth
    Type
    string
    Description

    Year of birth of the user

  • Name
    birthDate
    Type
    string
    Description

    Birth date of the user

  • Name
    newsLetterSubscribed
    Type
    boolean
    Description

    Flag to check if newsletter is subscribed by the user

  • Name
    userSourceType
    Type
    number
    Description

    Source type of the user e.g. 1

  • Name
    referralType
    Type
    string
    Description

    Referral type of the user

  • Name
    userReferrer
    Type
    string
    Description

    Referrer of the the user

  • Name
    notifyByEmail
    Type
    boolean
    Description

    Flag to check if user wants to be notified by email

  • Name
    notifyBySMS
    Type
    boolean
    Description

    Flag to check if user wants to be notified by SMS

  • Name
    notifyByPost
    Type
    boolean
    Description

    Flag to check if user wants to be notified by Post

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    isDefaultDelivery
    Type
    boolean
    Description

    Flag to check if the addresss is default delivery address

  • Name
    isDefaultForSubscription
    Type
    boolean
    Description

    Flag to check if the address is default

  • Name
    isDefaultBilling
    Type
    boolean
    Description

    Flag to check if the address is default billing address

  • Name
    isDefault
    Type
    boolean
    Description

    Flag to check if this shipping method is the default shipping method

  • Name
    fax
    Type
    string
    Description

    Fax number of the company

  • Name
    addressType
    Type
    number
    Description

    Type of address

  • Name
    companyWebsite
    Type
    string
    Description

    Company website url

  • Name
    tradingCurrency
    Type
    string
    Description

    Trading currency for the region

  • Name
    localTextKey
    Type
    string
    Description

    local text key for the region

  • Name
    created
    Type
    string
    Description

    Time when the quote was created

  • Name
    lastUpdated
    Type
    string
    Description

    The date and time when the quote was last updated

  • Name
    createdBy
    Type
    string
    Description

    Name of the user who created of the quote

  • Name
    lastUpdatedBy
    Type
    string
    Description

    Name of the user who last updated the quote

  • Name
    ipAddress
    Type
    string
    Description

    Ip address used to create the quote

  • Name
    orgId
    Type
    string
    Description

    Organization Id of the quote

  • Name
    branchId
    Type
    string
    Description

    Branch Id of the company that created the quote

  • Name
    domainId
    Type
    string
    Description

    Domain Id of the company that created the quote

  • Name
    totalRecord
    Type
    number
    Description

    Total number of records

  • Name
    currentPage
    Type
    number
    Description

    Current page number

  • Name
    pageSize
    Type
    number
    Description

    Size of the page

  • Name
    externalStatus
    Type
    string
    Description

    External status of the quote

  • Name
    isRegistered
    Type
    boolean
    Description

    Flag to check if the user is registered

  • Name
    sourceProcess
    Type
    string
    Description

    Source process of the company

  • Name
    isWelcomeEmailSent
    Type
    boolean
    Description

    Flag to check if the Welcome email is sent

  • Name
    isCreatedByAdmin
    Type
    boolean
    Description

    Flag to check if the quote is created by the admin

  • Name
    hasSubscription
    Type
    boolean
    Description

    Flag to check if the user has a subscription

  • Name
    hasMembership
    Type
    boolean
    Description

    Flag to check if the user has a membership

  • Name
    externalAccountingId
    Type
    string
    Description

    Id used to identify External accounting

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    userId
    Type
    string
    Description

    User id used to identify the user

  • Name
    isPromptPasswordChange
    Type
    boolean
    Description

    Flag to check if the prompt to change the password has been initiated

  • Name
    isForcePasswordChange
    Type
    boolean
    Description

    Flag to check if force password change has been initiated

  • Name
    isConvertCompanyRequest
    Type
    boolean
    Description

    Flag to check if the company request must be converted

  • Name
    hasSubscribed
    Type
    boolean
    Description

    Flag to check if the user has already subscribed to a subscription

Request

POST
/api/v2/commerce/customer/:sessionId/ghostuser
curl --location --request POST 'https://api20.bettercommerce.io/api/v2/commerce/customer/proident culpa anim nisi aliquip/ghostuser' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; 
ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'

Response

{
"statusCode": 306,
"status": "pariatur ",
"errors": [
    "labore",
    "irure eiusmod"
],
"success": false,
"message": "aliquip dolore",
"messageCode": "est tempor Duis",
"result": {
    "userId": "00000000-0000-0000-0000-000000000000",
    "username": "consectetur",
    "firstName": "Ut enim",
    "lastName": "nulla pariatur",
    "email": "id aute veniam voluptate lab",
    "title": "consequat in aute veniam",
    "telephone": "tempor veniam",
    "mobile": "fugiat non",
    "gender": "eiusmod cupidatat sunt esse",
    "password": "dolore laboris sit cillum ad",
    "nickName": "tempor nisi",
    "dayOfBirth": "laborum ",
    "monthOfBirth": "magna culpa fugiat dolor",
    "yearOfBirth": "laboris adipisicing exercitation anim",
    "birthDate": "deserunt",
    "postCode": "culpa",
    "newsLetterSubscribed": false,
    "userSourceType": 2,
    "referralType": "Facebook",
    "userReferrer": "dolore magna minim",
    "address": {
        "addressType": 20719842,
        "companyWebsite": "Excepteur",
        "tradingCurrency": "Excepteur ",
        "userId": "00000000-0000-0000-0000-000000000000",
        "title": "voluptate ut veniam quis",
        "firstName": "commodo reprehenderit cillum an",
        "lastName": "consectetur reprehenderit",
        "address1": "proident minim",
        "address2": "occaecat consequat pariatur nulla Duis",
        "address3": "repreh",
        "city": "adipisicing esse",
        "state": "reprehenderit voluptate",
        "country": "aliquip in eiusmod exercitation",
        "countryCode": "veniam Duis incididunt do",
        "postCode": "dolore Excepteur ullamco",
        "phoneNo": "",
        "isDefaultDelivery": false,
        "isDefaultBilling": true,
        "isDefault": true,
        "isDefaultForSubscription": false,
        "companyName": "sint non",
        "companyId": "ut amet minim",
        "fax": "quis proident nisi",
        "email": "in",
        "id": 54099935,
        "recordId": "00000000-0000-0000-0000-000000000000",
        "localTextKey": "aliqua",
        "created": "1997-08-18T01:51:24.289Z",
        "lastUpdated": "1986-02-28T07:02:23.588Z",
        "createdBy": "dolore",
        "lastUpdatedBy": "eiusmod elit esse",
        "ipAddress": "laborum ea in ullamco",
        "orgId": "00000000-0000-0000-0000-000000000000",
        "branchId": "00000000-0000-0000-0000-000000000000",
        "domainId": "00000000-0000-0000-0000-000000000000",
        "totalRecord": 58082478,
        "currentPage": 7872682,
        "pageSize": 72795637,
        "externalStatus": "nulla commodo"
    },
    "companyId": "minim sint laboris",
    "companyName": "id of",
    "businessType": "magna ut do ut",
    "registeredNumber": "in dolore",
    "priceListId": "00000000-0000-0000-0000-000000000000",
    "companyUserRole": 1,
    "isRegistered": false,
    "notifyByEmail": false,
    "notifyBySMS": false,
    "notifyByPost": false,
    "sourceProcess": "ullamco labore",
    "isWelcomeEmailSent": true,
    "isPromptPasswordChange": false,
    "isForcePasswordChange": true,
    "isCreatedByAdmin": true,
    "isConvertCompanyRequest": false,
    "hasSubscription": false,
    "hasMembership": false,
    "externalAccountingId": "ad labore laborum q",
    "registrationSource": "elit Excepteur in sed",
    "hasSubscribed": true,
    "customerGroupId": "00000000-0000-0000-0000-000000000000"
}
}

GET/api/v2/commerce/customer/:id

Get user details by Id (Guid).

This endpoint allows you to get user details by Id (Guid).

Developers - API Operations:

OperationEndpointResponse
Get Users/api/v2/commerce/customer/:idGet user details by Id (Guid).

Required attributes

  • Name
    id
    Type
    GUID
    Description

    Id used to identify the user

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    array
    Description

    Result of the response

  • Name
    businessType
    Type
    string
    Description

    Business type of the company

  • Name
    registeredNumber
    Type
    string
    Description

    Registered number of the company

  • Name
    priceListId
    Type
    string
    Description

    Price list Id used to identify the price list

  • Name
    companyUserRole
    Type
    string
    Description

    User role of the company

  • Name
    customerGroupId
    Type
    string
    Description

    CustomerGroupId used to identify Customer groups

  • Name
    companyId
    Type
    string
    Description

    Company Id to identify the company

  • Name
    id
    Type
    string
    Description

    id to identify the user address

  • Name
    title
    Type
    string
    Description

    Title of the user e.g. Miss./Mrs./Mr.

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    address1
    Type
    string
    Description

    Address Line 1 provided by the user

  • Name
    address2
    Type
    string
    Description

    Address Line 2 provided by the user

  • Name
    address3
    Type
    string
    Description

    Address Line 3 provided by the user

  • Name
    city
    Type
    string
    Description

    City name provided by the user

  • Name
    state
    Type
    string
    Description

    State name provided by the user

  • Name
    country
    Type
    string
    Description

    Country name provided by the user

  • Name
    countryCode
    Type
    string
    Description

    Country code provided by the user

  • Name
    postCode
    Type
    string
    Description

    Post code provided by the user

  • Name
    phoneNo
    Type
    string
    Description

    Phone number of the user

  • Name
    companyName
    Type
    string
    Description

    Name of the company provided by the user

  • Name
    address
    Type
    object
    Description

    Address of the company

  • Name
    username
    Type
    string
    Description

    Username of the user

  • Name
    email
    Type
    string
    Description

    Email of the company

  • Name
    telephone
    Type
    string
    Description

    Telephone number of the user

  • Name
    mobile
    Type
    string
    Description

    Mobile number of the user

  • Name
    gender
    Type
    string
    Description

    Gender of the user

  • Name
    password
    Type
    string
    Description

    Password of the user

  • Name
    nickName
    Type
    string
    Description

    Nick name of the user

  • Name
    dayOfBirth
    Type
    string
    Description

    Day of birth of the user

  • Name
    monthOfBirth
    Type
    string
    Description

    Month of birth of the user

  • Name
    yearOfBirth
    Type
    string
    Description

    Year of birth of the user

  • Name
    birthDate
    Type
    string
    Description

    Birth date of the user

  • Name
    newsLetterSubscribed
    Type
    boolean
    Description

    Flag to check if newsletter is subscribed by the user

  • Name
    userSourceType
    Type
    number
    Description

    Source type of the user e.g. 1

  • Name
    referralType
    Type
    string
    Description

    Referral type of the user

  • Name
    userReferrer
    Type
    string
    Description

    Referrer of the the user

  • Name
    notifyByEmail
    Type
    boolean
    Description

    Flag to check if user wants to be notified by email

  • Name
    notifyBySMS
    Type
    boolean
    Description

    Flag to check if user wants to be notified by SMS

  • Name
    notifyByPost
    Type
    boolean
    Description

    Flag to check if user wants to be notified by Post

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    isDefaultDelivery
    Type
    boolean
    Description

    Flag to check if the addresss is default delivery address

  • Name
    isDefaultForSubscription
    Type
    boolean
    Description

    Flag to check if the address is default

  • Name
    isDefaultBilling
    Type
    boolean
    Description

    Flag to check if the address is default billing address

  • Name
    isDefault
    Type
    boolean
    Description

    Flag to check if this shipping method is the default shipping method

  • Name
    fax
    Type
    string
    Description

    Fax number of the company

  • Name
    addressType
    Type
    number
    Description

    Type of address

  • Name
    companyWebsite
    Type
    string
    Description

    Company website url

  • Name
    tradingCurrency
    Type
    string
    Description

    Trading currency for the region

  • Name
    localTextKey
    Type
    string
    Description

    local text key for the region

  • Name
    created
    Type
    string
    Description

    Time when the quote was created

  • Name
    lastUpdated
    Type
    string
    Description

    The date and time when the quote was last updated

  • Name
    createdBy
    Type
    string
    Description

    Name of the user who created of the quote

  • Name
    lastUpdatedBy
    Type
    string
    Description

    Name of the user who last updated the quote

  • Name
    ipAddress
    Type
    string
    Description

    Ip address used to create the quote

  • Name
    orgId
    Type
    string
    Description

    Organization Id of the quote

  • Name
    branchId
    Type
    string
    Description

    Branch Id of the company that created the quote

  • Name
    domainId
    Type
    string
    Description

    Domain Id of the company that created the quote

  • Name
    totalRecord
    Type
    number
    Description

    Total number of records

  • Name
    currentPage
    Type
    number
    Description

    Current page number

  • Name
    pageSize
    Type
    number
    Description

    Size of the page

  • Name
    externalStatus
    Type
    string
    Description

    External status of the quote

  • Name
    isRegistered
    Type
    boolean
    Description

    Flag to check if the user is registered

  • Name
    sourceProcess
    Type
    string
    Description

    Source process of the company

  • Name
    isWelcomeEmailSent
    Type
    boolean
    Description

    Flag to check if the Welcome email is sent

  • Name
    isCreatedByAdmin
    Type
    boolean
    Description

    Flag to check if the quote is created by the admin

  • Name
    hasSubscription
    Type
    boolean
    Description

    Flag to check if the user has a subscription

  • Name
    hasMembership
    Type
    boolean
    Description

    Flag to check if the user has a membership

  • Name
    externalAccountingId
    Type
    string
    Description

    Id used to identify External accounting

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    userId
    Type
    string
    Description

    User id used to identify the user

  • Name
    isPromptPasswordChange
    Type
    boolean
    Description

    Flag to check if the prompt to change the password has been initiated

  • Name
    isForcePasswordChange
    Type
    boolean
    Description

    Flag to check if force password change has been initiated

  • Name
    isConvertCompanyRequest
    Type
    boolean
    Description

    Flag to check if the company request must be converted

  • Name
    hasSubscribed
    Type
    boolean
    Description

    Flag to check if the user has already subscribed to a subscription

Request

GET
/api/v2/commerce/customer/:id
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/customer/:id' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597;
ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'

Response

{
"statusCode": 306,
"status": "pariatur ",
"errors": [
    "labore",
    "irure eiusmod"
],
"success": false,
"message": "aliquip dolore",
"messageCode": "est tempor Duis",
"result": {
    "userId": "00000000-0000-0000-0000-000000000000",
    "username": "consectetur",
    "firstName": "Ut enim",
    "lastName": "nulla pariatur",
    "email": "id aute veniam voluptate lab",
    "title": "consequat in aute veniam",
    "telephone": "tempor veniam",
    "mobile": "fugiat non",
    "gender": "eiusmod cupidatat sunt esse",
    "password": "dolore laboris sit cillum ad",
    "nickName": "tempor nisi",
    "dayOfBirth": "laborum ",
    "monthOfBirth": "magna culpa fugiat dolor",
    "yearOfBirth": "laboris adipisicing exercitation anim",
    "birthDate": "deserunt",
    "postCode": "culpa",
    "newsLetterSubscribed": false,
    "userSourceType": 2,
    "referralType": "Facebook",
    "userReferrer": "dolore magna minim",
    "address": {
        "addressType": 20719842,
        "companyWebsite": "Excepteur",
        "tradingCurrency": "Excepteur ",
        "userId": "00000000-0000-0000-0000-000000000000",
        "title": "voluptate ut veniam quis",
        "firstName": "commodo reprehenderit cillum an",
        "lastName": "consectetur reprehenderit",
        "address1": "proident minim",
        "address2": "occaecat consequat pariatur nulla Duis",
        "address3": "repreh",
        "city": "adipisicing esse",
        "state": "reprehenderit voluptate",
        "country": "aliquip in eiusmod exercitation",
        "countryCode": "veniam Duis incididunt do",
        "postCode": "dolore Excepteur ullamco",
        "phoneNo": "",
        "isDefaultDelivery": false,
        "isDefaultBilling": true,
        "isDefault": true,
        "isDefaultForSubscription": false,
        "companyName": "sint non",
        "companyId": "ut amet minim",
        "fax": "quis proident nisi",
        "email": "in",
        "id": 54099935,
        "recordId": "00000000-0000-0000-0000-000000000000",
        "localTextKey": "aliqua",
        "created": "1997-08-18T01:51:24.289Z",
        "lastUpdated": "1986-02-28T07:02:23.588Z",
        "createdBy": "dolore",
        "lastUpdatedBy": "eiusmod elit esse",
        "ipAddress": "laborum ea in ullamco",
        "orgId": "00000000-0000-0000-0000-000000000000",
        "branchId": "00000000-0000-0000-0000-000000000000",
        "domainId": "00000000-0000-0000-0000-000000000000",
        "totalRecord": 58082478,
        "currentPage": 7872682,
        "pageSize": 72795637,
        "externalStatus": "nulla commodo"
    },
    "companyId": "minim sint laboris",
    "companyName": "id of",
    "businessType": "magna ut do ut",
    "registeredNumber": "in dolore",
    "priceListId": "00000000-0000-0000-0000-000000000000",
    "companyUserRole": 1,
    "isRegistered": false,
    "notifyByEmail": false,
    "notifyBySMS": false,
    "notifyByPost": false,
    "sourceProcess": "ullamco labore",
    "isWelcomeEmailSent": true,
    "isPromptPasswordChange": false,
    "isForcePasswordChange": true,
    "isCreatedByAdmin": true,
    "isConvertCompanyRequest": false,
    "hasSubscription": false,
    "hasMembership": false,
    "externalAccountingId": "ad labore laborum q",
    "registrationSource": "elit Excepteur in sed",
    "hasSubscribed": true,
    "customerGroupId": "00000000-0000-0000-0000-000000000000"
}
}

PUT/api/v2/commerce/customer/:id/update

Customer Update.

This endpoint allows you to update a customer.

Developers - API Operations:

OperationEndpointResponse
Update Users/api/v2/commerce/customer/:id/updateCustomer Update.

Required attributes

  • Name
    id
    Type
    GUID
    Description

    Id used to identify the user

  • Name
    value
    Type
    model
    Description

    Object containing new customer information to be updated

Model attributes

  • Name
    id
    Type
    string
    Description

    id to identify the user address

  • Name
    title
    Type
    string
    Description

    Title of the user e.g. Miss./Mrs./Mr.

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    postCode
    Type
    string
    Description

    Post code provided by the user

  • Name
    username
    Type
    string
    Description

    Username of the user

  • Name
    telephone
    Type
    string
    Description

    Telephone number of the user

  • Name
    mobile
    Type
    string
    Description

    Mobile number of the user

  • Name
    gender
    Type
    string
    Description

    Gender of the user

  • Name
    password
    Type
    string
    Description

    Password of the user

  • Name
    nickName
    Type
    string
    Description

    Nick name of the user

  • Name
    dayOfBirth
    Type
    string
    Description

    Day of birth of the user

  • Name
    monthOfBirth
    Type
    string
    Description

    Month of birth of the user

  • Name
    yearOfBirth
    Type
    string
    Description

    Year of birth of the user

  • Name
    birthDate
    Type
    string
    Description

    Birth date of the user

  • Name
    newsLetterSubscribed
    Type
    boolean
    Description

    Flag to check if newsletter is subscribed by the user

  • Name
    userSourceType
    Type
    number
    Description

    Source type of the user e.g. 1

  • Name
    referralType
    Type
    string
    Description

    Referral type of the user

  • Name
    userReferrer
    Type
    string
    Description

    Referrer of the the user

  • Name
    notifyByEmail
    Type
    boolean
    Description

    Flag to check if user wants to be notified by email

  • Name
    notifyBySMS
    Type
    boolean
    Description

    Flag to check if user wants to be notified by SMS

  • Name
    notifyByPost
    Type
    boolean
    Description

    Flag to check if user wants to be notified by Post

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    boolean
    Description

    Result of the response

Request

PUT
/api/v2/commerce/customer/:id/update
curl --location --request PUT 'https://api20.bettercommerce.io/api/v2/commerce/customer/:id/update' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597' \
--data-urlencode 'username=dolore ex qui' \
--data-urlencode 'firstName=esse sint' \
--data-urlencode 'lastName=labore fugiat' \
--data-urlencode 'email=est tempor' \
--data-urlencode 'title=sint ullamco' \
--data-urlencode 'telephone=ut reprehenderit' \
--data-urlencode 'mobile=dolor incididunt ullamco' \
--data-urlencode 'gender=est' \
--data-urlencode 'password=do Excepteur nulla commodo' \
--data-urlencode 'nickName=magna' \
--data-urlencode 'dayOfBirth=reprehenderit nulla amet ullamco' \
--data-urlencode 'monthOfBirth=nisi velit' \
--data-urlencode 'yearOfBirth=irure officia' \
--data-urlencode 'birthDate=ipsum' \
--data-urlencode 'postCode=sint' \
--data-urlencode 'newsLetterSubscribed=false' \
--data-urlencode 'userSourceType=NaN' \
--data-urlencode 'referralType=Webgains' \
--data-urlencode 'userReferrer=Excepteur' \
--data-urlencode 'companyName=elit' \
--data-urlencode 'notifyByEmail=false' \
--data-urlencode 'notifyBySMS=true' \
--data-urlencode 'notifyByPost=true' \
--data-urlencode 'registrationSource=dolor reprehe'

Response

{
"statusCode": null,
"status": "sit Duis nostrud officia",
"errors": [
    "amet culpa commodo",
    "ut occaecat dolor do"
],
"success": true,
"message": "reprehenderit",
"messageCode": "ex ullam",
"result": false
}

DELETE/api/v2/commerce/customer/:id/delete

Delete existing user.

This endpoint allows you to delete an existing user.

Developers - API Operations:

OperationEndpointResponse
Delete Users/api/v2/commerce/customer/:id/deleteDelete existing user.

Required attributes

  • Name
    id
    Type
    GUID
    Description

    Id used ti identify the user

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    boolean
    Description

    Result of the response

Request

DELETE
/api/v2/commerce/customer/:id/delete
curl --location --request DELETE 'https://api20.bettercommerce.io/api/v2/commerce/customer/:id/delete' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; 
ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'

Response

{
"statusCode": 410,
"status": "mollit incididunt reprehenderit id aliqua",
"errors": [
    "dolor do",
    "sit consequat consectetur"
],
"success": false,
"message": "nisi Lorem deserunt tempor",
"messageCode": "non voluptate veniam et",
"result": true
}

GET/api/v2/commerce/customer/:id/membership

Get customer's membership plan details.

This endpoint allows you to get customer's membership plan details.

Developers - API Operations:

OperationEndpointResponse
Get Membership Details/api/v2/commerce/customer/:id/membershipGet customer's membership plan details.

Required attributes

  • Name
    id
    Type
    GUID
    Description

    Id used to identify the user

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    array
    Description

    Result of the response

  • Name
    businessType
    Type
    string
    Description

    Business type of the company

  • Name
    registeredNumber
    Type
    string
    Description

    Registered number of the company

  • Name
    priceListId
    Type
    string
    Description

    Price list Id used to identify the price list

  • Name
    companyUserRole
    Type
    string
    Description

    User role of the company

  • Name
    customerGroupId
    Type
    string
    Description

    CustomerGroupId used to identify Customer groups

  • Name
    companyId
    Type
    string
    Description

    Company Id to identify the company

  • Name
    id
    Type
    string
    Description

    id to identify the user address

  • Name
    title
    Type
    string
    Description

    Title of the user e.g. Miss./Mrs./Mr.

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    address1
    Type
    string
    Description

    Address Line 1 provided by the user

  • Name
    address2
    Type
    string
    Description

    Address Line 2 provided by the user

  • Name
    address3
    Type
    string
    Description

    Address Line 3 provided by the user

  • Name
    city
    Type
    string
    Description

    City name provided by the user

  • Name
    state
    Type
    string
    Description

    State name provided by the user

  • Name
    country
    Type
    string
    Description

    Country name provided by the user

  • Name
    countryCode
    Type
    string
    Description

    Country code provided by the user

  • Name
    postCode
    Type
    string
    Description

    Post code provided by the user

  • Name
    phoneNo
    Type
    string
    Description

    Phone number of the user

  • Name
    companyName
    Type
    string
    Description

    Name of the company provided by the user

  • Name
    address
    Type
    object
    Description

    Address of the company

  • Name
    username
    Type
    string
    Description

    Username of the user

  • Name
    email
    Type
    string
    Description

    Email of the company

  • Name
    telephone
    Type
    string
    Description

    Telephone number of the user

  • Name
    mobile
    Type
    string
    Description

    Mobile number of the user

  • Name
    gender
    Type
    string
    Description

    Gender of the user

  • Name
    password
    Type
    string
    Description

    Password of the user

  • Name
    nickName
    Type
    string
    Description

    Nick name of the user

  • Name
    dayOfBirth
    Type
    string
    Description

    Day of birth of the user

  • Name
    monthOfBirth
    Type
    string
    Description

    Month of birth of the user

  • Name
    yearOfBirth
    Type
    string
    Description

    Year of birth of the user

  • Name
    birthDate
    Type
    string
    Description

    Birth date of the user

  • Name
    newsLetterSubscribed
    Type
    boolean
    Description

    Flag to check if newsletter is subscribed by the user

  • Name
    userSourceType
    Type
    number
    Description

    Source type of the user e.g. 1

  • Name
    referralType
    Type
    string
    Description

    Referral type of the user

  • Name
    userReferrer
    Type
    string
    Description

    Referrer of the the user

  • Name
    notifyByEmail
    Type
    boolean
    Description

    Flag to check if user wants to be notified by email

  • Name
    notifyBySMS
    Type
    boolean
    Description

    Flag to check if user wants to be notified by SMS

  • Name
    notifyByPost
    Type
    boolean
    Description

    Flag to check if user wants to be notified by Post

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    isDefaultDelivery
    Type
    boolean
    Description

    Flag to check if the addresss is default delivery address

  • Name
    isDefaultForSubscription
    Type
    boolean
    Description

    Flag to check if the address is default

  • Name
    isDefaultBilling
    Type
    boolean
    Description

    Flag to check if the address is default billing address

  • Name
    isDefault
    Type
    boolean
    Description

    Flag to check if this shipping method is the default shipping method

  • Name
    fax
    Type
    string
    Description

    Fax number of the company

  • Name
    addressType
    Type
    number
    Description

    Type of address

  • Name
    companyWebsite
    Type
    string
    Description

    Company website url

  • Name
    tradingCurrency
    Type
    string
    Description

    Trading currency for the region

  • Name
    localTextKey
    Type
    string
    Description

    local text key for the region

  • Name
    created
    Type
    string
    Description

    Time when the quote was created

  • Name
    lastUpdated
    Type
    string
    Description

    The date and time when the quote was last updated

  • Name
    createdBy
    Type
    string
    Description

    Name of the user who created of the quote

  • Name
    lastUpdatedBy
    Type
    string
    Description

    Name of the user who last updated the quote

  • Name
    ipAddress
    Type
    string
    Description

    Ip address used to create the quote

  • Name
    orgId
    Type
    string
    Description

    Organization Id of the quote

  • Name
    branchId
    Type
    string
    Description

    Branch Id of the company that created the quote

  • Name
    domainId
    Type
    string
    Description

    Domain Id of the company that created the quote

  • Name
    totalRecord
    Type
    number
    Description

    Total number of records

  • Name
    currentPage
    Type
    number
    Description

    Current page number

  • Name
    pageSize
    Type
    number
    Description

    Size of the page

  • Name
    externalStatus
    Type
    string
    Description

    External status of the quote

  • Name
    isRegistered
    Type
    boolean
    Description

    Flag to check if the user is registered

  • Name
    sourceProcess
    Type
    string
    Description

    Source process of the company

  • Name
    isWelcomeEmailSent
    Type
    boolean
    Description

    Flag to check if the Welcome email is sent

  • Name
    isCreatedByAdmin
    Type
    boolean
    Description

    Flag to check if the quote is created by the admin

  • Name
    hasSubscription
    Type
    boolean
    Description

    Flag to check if the user has a subscription

  • Name
    hasMembership
    Type
    boolean
    Description

    Flag to check if the user has a membership

  • Name
    externalAccountingId
    Type
    string
    Description

    Id used to identify External accounting

  • Name
    registrationSource
    Type
    string
    Description

    Registration source of the company

  • Name
    userId
    Type
    string
    Description

    User id used to identify the user

  • Name
    isPromptPasswordChange
    Type
    boolean
    Description

    Flag to check if the prompt to change the password has been initiated

  • Name
    isForcePasswordChange
    Type
    boolean
    Description

    Flag to check if force password change has been initiated

  • Name
    isConvertCompanyRequest
    Type
    boolean
    Description

    Flag to check if the company request must be converted

  • Name
    hasSubscribed
    Type
    boolean
    Description

    Flag to check if the user has already subscribed to a subscription

  • Name
    promoCode
    Type
    string
    Description

    Promotion code used to validate the offer

  • Name
    voucher
    Type
    string
    Description

    Voucher used to validate the offer and claim the benefits

  • Name
    orderNo
    Type
    number
    Description

    Order Number of the order

  • Name
    orderId
    Type
    string
    Description

    Order Id of the order

  • Name
    siteUserMembershipId
    Type
    string
    Description

    User membership Id used to identify the user's Membership on the site

  • Name
    promoName
    Type
    string
    Description

    Name of the promotion to be applied

  • Name
    validityStart
    Type
    string
    Description

    Date and time of the start of validity of the membership

  • Name
    validityEnd
    Type
    string
    Description

    Date and time of the end of validity of the membership

  • Name
    status
    Type
    number
    Description

    status of the membership

  • Name
    claimDate
    Type
    string
    Description

    Date and time of the date during the claim window when the claim is made

  • Name
    membershipBarcodeUrl
    Type
    string
    Description

    URL of the membership barcode

  • Name
    voucherBarCodeUrl
    Type
    string
    Description

    URL of the voucher barcode

  • Name
    discountPct
    Type
    number
    Description

    Discount value applied on the product in Percentage

  • Name
    membershipOrderId
    Type
    string
    Description

    Order Id of the membership ordered by the user

Request

GET
/api/v2/commerce/customer/:id/membership
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/customer/:id/membership' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597;
ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'

Response

{
"statusCode": 401,
"status": "in ex dolor aute sint",
"errors": [
    "ad quis commodo laboris enim",
    "adipisicing"
],
"success": true,
"message": "consectetur laborum",
"messageCode": "enim officia Excepteur",
"result": [
    {
        "siteUserMembershipId": "00000000-0000-0000-0000-000000000000",
        "userId": "00000000-0000-0000-0000-000000000000",
        "email": "consectetur magna dolor",
        "promoCode": "cupidatat voluptate",
        "voucher": "quis consequat volup",
        "promoName": "incididunt enim reprehenderit",
        "orderNo": "Excepteur",
        "orderId": "00000000-0000-0000-0000-000000000000",
        "validityStart": "1994-07-22T04:31:09.712Z",
        "validityEnd": "1948-01-19T21:04:13.913Z",
        "status": 0,
        "claimDate": "1943-01-08T17:28:54.158Z",
        "membershipBarcodeUrl": "ex d",
        "voucherBarCodeUrl": "nostrud esse minim ut",
        "discountPct": -94410336,
        "membershipOrderId": "00000000-0000-0000-0000-000000000000"
    },
]
}

GET/api/v2/commerce/customer/:id/membership/upgrade-options

Get upgrade options for customer's membership plan.

This endpoint allows you to get upgrade options for customer's membership plan.

Developers - API Operations:

OperationEndpointResponse
Get Membership Details/api/v2/commerce/customer/:id/membership/upgrade-optionsGet upgrade options for customer's membership plan.

Required attributes

  • Name
    id
    Type
    GUID
    Description

    Id used to identify the membership

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    array
    Description

    Result of the response

  • Name
    id
    Type
    string
    Description

    id to identify the user address

  • Name
    shippingMethodMappings
    Type
    array
    Description

    List of shipping methods mapping

  • Name
    membershipBenefits
    Type
    array
    Description

    List of mermbership benefits details

  • Name
    membershipPlanId
    Type
    string
    Description

    Id used to identify membership plans

  • Name
    membershipPlanName
    Type
    string
    Description

    Name of the membership plan

  • Name
    stockCode
    Type
    string
    Description

    Stock code of the product

  • Name
    productId
    Type
    string
    Description

    Id used to identify the product

  • Name
    noOfVouchers
    Type
    number
    Description

    Number of vouchers available for the product

  • Name
    price
    Type
    string
    Description

    Price of the product

  • Name
    minPrice
    Type
    number
    Description

    Minimum price for the membership

  • Name
    minPriceWithoutTax
    Type
    number
    Description

    Minimum price for the membership without tax

  • Name
    maxPrice
    Type
    number
    Description

    Maximum price for the membership

  • Name
    maxPriceWithoutTax
    Type
    number
    Description

    Maximum price for the membership wihtout tax

  • Name
    currencyDecimalSeparator
    Type
    string
    Description

    Currency decimal separator for the region

  • Name
    currencyDigitsAfterDecimal
    Type
    number
    Description

    Digits after decimal for the currency

  • Name
    formatted
    Type
    object
    Description

    Formatted price with and without tax

  • Name
    withTax
    Type
    string
    Description

    Price of basket item with Tax

  • Name
    withoutTax
    Type
    string
    Description

    Price of basket item without Tax

  • Name
    tax
    Type
    string
    Description

    Tax amount of basket item

  • Name
    raw
    Type
    object
    Description

    Raw price without discount

  • Name
    membershipPrice
    Type
    object
    Description

    Membership price that is paid by members

  • Name
    membershipSKU
    Type
    string
    Description

    Membership SKU is a number (usually eight alphanumeric digits) that is assigned to products/sevices to keep track of stock levels internally.

  • Name
    displayOrder
    Type
    number
    Description

    Display order of the membership plan in the list of membership plans

  • Name
    upgradeFromMembershipId
    Type
    string
    Description

    Id used to identify the membership from which the user will be upgraded to a new plan

  • Name
    upgradeFromMembershipName
    Type
    string
    Description

    Name of the membership from which the user will be upgraded to a new plan

Request

GET
/api/v2/commerce/customer/:id/membership/upgrade-options
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/customer/:id/membership/upgrade-options' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; 
ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'

Response

{
"statusCode": 415,
"status": "esse dolor",
"errors": [
    "ex commodo",
    "consequat aliqua incididunt"
],
"success": true,
"message": "commodo in",
"messageCode": "esse enim",
"result": [
    {
        "shippingMethodMappings": [
            {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            }
        ],
        "membershipBenefits": [
            {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            }
        ],
        "membershipPlanId": "00000000-0000-0000-0000-000000000000",
        "membershipPlanName": "ipsum sunt adipisicing voluptate",
        "stockCode": "culpa Ut esse",
        "productId": "00000000-0000-0000-0000-000000000000",
        "noOfVouchers": -55532115,
        "price": {
            "minPrice": -20730740.69971566,
            "minPriceWithoutTax": 5580696.735582262,
            "maxPrice": -92792845.06018972,
            "maxPriceWithoutTax": -74964377.92500626,
            "currencyDecimalSeparator": "tempor Lorem Duis",
            "currencyDigitsAfterDecimal": -73080207,
            "currencySymbol": "amet id ipsum",
            "formatted": {
                "withTax": "Ut voluptate nostrud culpa",
                "withoutTax": "aute",
                "tax": "incididunt fugiat enim Excepteur"
            },
            "raw": {
                "withTax": 58994607.66759908,
                "withoutTax": -4895235.762055129,
                "tax": 39826752.45594683
            }
        },
        "membershipPrice": {
            "minPrice": 20719070.886727005,
            "minPriceWithoutTax": 61894321.31367728,
            "maxPrice": 67755860.69763872,
            "maxPriceWithoutTax": 83151282.90815213,
            "currencyDecimalSeparator": "quis est do commodo",
            "currencyDigitsAfterDecimal": 60996127,
            "currencySymbol": "sed",
            "formatted": {
                "withTax": "proident",
                "withoutTax": "incididunt",
                "tax": ""
            },
            "raw": {
                "withTax": -81033365.31068006,
                "withoutTax": -12968059.770321012,
                "tax": 58889377.773637354
            }
        },
        "membershipSKU": "dolor voluptate reprehenderit eiusmod deserunt",
        "displayOrder": -33330567,
        "upgradeFromMembershipId": "00000000-0000-0000-0000-000000000000",
        "upgradeFromMembershipName": "veniam aliquip Excepteur esse enim"
    },
]
}

GET/api/v2/commerce/customer/:id/orders?hasMembership=false&pageSize=20&pageNumber=1

Orders List.

This endpoint allows you to get an orders list.

Developers - API Operations:

OperationEndpointResponse
Get Orders/api/v2/commerce/customer/:id/orders?hasMembership=false&pageSize=20&pageNumber=1Get Orders List.

Required attributes

  • Name
    id
    Type
    string
    Description

    Id used as unique identifier for customer

  • Name
    hasMembership
    Type
    boolean
    Description

    Flag to fetch ONLY membership orders or ALL standard orders

  • Name
    pageNumber
    Type
    number
    Description

    Page number as a numeic value

  • Name
    pageSize
    Type
    number
    Description

    Number of orders per request

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    boolean
    Description

    Result of the response

  • Name
    id
    Type
    string
    Description

    Id used to identify the orders

  • Name
    orderNo
    Type
    string
    Description

    Order number of the order

  • Name
    orderDate
    Type
    string
    Description

    Date and time when the order was placed

  • Name
    orderStatus
    Type
    number
    Description

    Status of the order in numeric value

  • Name
    productId
    Type
    string
    Description

    Id used to identify the product

  • Name
    stockCode
    Type
    string
    Description

    Stock code of the product

  • Name
    name
    Type
    string
    Description

    Name of the product to be returned

  • Name
    manufacturer
    Type
    string
    Description

    Name of the manufacturer of the product

  • Name
    subManufacturer
    Type
    string
    Description

    Name of the Sub-Manufacturer of the product

  • Name
    qty
    Type
    number
    Description

    Quantity of products in the orders

  • Name
    shippedQty
    Type
    number
    Description

    Quantity of shipped products

  • Name
    returnQty
    Type
    number
    Description

    Quantity of products that are returned

  • Name
    price
    Type
    string
    Description

    Price of the product

  • Name
    minPrice
    Type
    number
    Description

    Minimum price for the order

  • Name
    minPriceWithoutTax
    Type
    number
    Description

    Minimum price for the order without tax

  • Name
    maxPrice
    Type
    number
    Description

    Maximum price for the order

  • Name
    maxPriceWithoutTax
    Type
    number
    Description

    Maximum price for the order wihtout tax

  • Name
    currencyDecimalSeparator
    Type
    string
    Description

    Currency decimal separator for the region

  • Name
    currencyDigitsAfterDecimal
    Type
    number
    Description

    Digits after decimal for the currency

  • Name
    currencySymbol
    Type
    string
    Description

    Currency Symbol for Price e.g £

  • Name
    formatted
    Type
    object
    Description

    Formatted price with and without tax

  • Name
    withTax
    Type
    string
    Description

    Price of returned item with Tax

  • Name
    withoutTax
    Type
    string
    Description

    Price of returned item item without Tax

  • Name
    tax
    Type
    string
    Description

    Tax amount of returned item

  • Name
    raw
    Type
    object
    Description

    Raw price without discount

  • Name
    discountAmt
    Type
    object
    Description

    The amount of discount to be applied on the products in the return list

  • Name
    totalPrice
    Type
    object
    Description

    Total price of the product

  • Name
    slug
    Type
    string
    Description

    Slug of the product used to navigate to the product

  • Name
    image
    Type
    string
    Description

    File name/URL of the image of the returned product

  • Name
    currencyCode
    Type
    string
    Description

    Currency code according to the region e.g. GBP:'Great Britain Pound'

  • Name
    grandTotal
    Type
    object
    Description

    Grand total price of returned items

  • Name
    subTotal
    Type
    object
    Description

    Sub total of the returned items

  • Name
    shippingCharge
    Type
    object
    Description

    Shipping charges of the product to be returned

  • Name
    refundAmount
    Type
    object
    Description

    Amount to be refunded based on the items returned

  • Name
    refundCharge
    Type
    object
    Description

    Amount charged on product return refunds

  • Name
    createdByAdmin
    Type
    boolean
    Description

    Flag to check if the order is created by the admin

  • Name
    displayOrder
    Type
    number
    Description

    Display order of the product in the basket

  • Name
    itemType
    Type
    number
    Description

    Type of item in the basket

  • Name
    displayInBasket
    Type
    boolean
    Description

    Flag to check if the product should be displayed in the basket

  • Name
    companyDiscount
    Type
    object
    Description

    The discount given on the original price of the products by the company to their employees

  • Name
    stockCode
    Type
    string
    Description

    Stock code of the product

  • Name
    name
    Type
    string
    Description

    Name of the product

  • Name
    slug
    Type
    string
    Description

    Slug of the product used to navigate to the product

  • Name
    shortDescription
    Type
    string
    Description

    A short description of the product

  • Name
    isSubscription
    Type
    boolean
    Description

    Flag to check if the user has an active subscription

  • Name
    isMembership
    Type
    boolean
    Description

    Flag to check if the user has an active membership

  • Name
    balanceAmount
    Type
    object
    Description

    Amount remaining as balance to be paid

  • Name
    paidAmount
    Type
    object
    Description

    Amount already paid by the customer

  • Name
    itemsBasic
    Type
    array
    Description

    List of items with basic information about those items

  • Name
    billingAddress
    Type
    object
    Description

    Billing address of the customer

  • Name
    shippingAddress
    Type
    object
    Description

    Shipping address of the customer

  • Name
    shipping
    Type
    object
    Description

    Shipping details of the order

  • Name
    paymentMethod
    Type
    object
    Description

    Payment methods chosen by the customer to carry out the payments

  • Name
    customerId
    Type
    string
    Description

    Customer Id to identify the user

  • Name
    currencyCode
    Type
    string
    Description

    Currency code according to the region e.g. GBP:'Great Britain Pound'

  • Name
    currencySymbol
    Type
    string
    Description

    Currency Symbol for Price e.g £

  • Name
    trackingNo
    Type
    string
    Description

    Tracking number of the order used for tracking the delivery

  • Name
    trackingLink
    Type
    string
    Description

    Tracking link contains the URL for tracking the order

  • Name
    membershipPlanId
    Type
    string
    Description

    Id used to identify membership plans

  • Name
    hasMembership
    Type
    boolean
    Description

    Flag to check if the user has a membership

  • Name
    membershipTotal
    Type
    object
    Description

    Total cost of membership for the user

  • Name
    deliveryPlans
    Type
    object
    Description

    A list of delivery plans for the delivery of the order

  • Name
    orderType
    Type
    number
    Description

    Type of order as a numeric value

  • Name
    carrierShippingMethodCode
    Type
    string
    Description

    Code for the carrier shipping method

  • Name
    carrierShippingMethodName
    Type
    string
    Description

    Name of the carrier shipping method

  • Name
    shippingMethodId
    Type
    string
    Description

    Shipping method Id to identify the shipping method

Request

GET
/api/v2/commerce/customer/:id/orders?hasMembership=false&pageSize=20&pageNumber=1
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/customer/:id/orders?hasMembership=false&pageSize=20&pageNumber=1' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; 
ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'

Response

{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": null,
"messageCode": null,
"result": [
    {
        "id": "3555d43e-52a0-ec11-b1ba-000d3a211cf7",
        "orderNo": "SO93182",
        "orderDate": "2022-03-10T09:12:45.353",
        "orderStatus": "Approved",
        "grandTotal": {
            "minPrice": 0,
            "minPriceWithoutTax": 0,
            "maxPrice": 0,
            "maxPriceWithoutTax": 0,
            "currencyDecimalSeparator": ",",
            "currencyDigitsAfterDecimal": 3,
            "currencySymbol": "£",
            "formatted": {
                "withTax": "£30.99",
                "withoutTax": "£27.49",
                "tax": "£3.50"
            },
            "raw": {
                "withTax": 30.99,
                "withoutTax": 27.49,
                "tax": 3.5
            }
        },
        "taxPercent": 0,
        "createdBy": "abc@abc.com",
        "createdByAdmin": false,
        "shippingCharge": {
            "minPrice": 0,
            "minPriceWithoutTax": 0,
            "maxPrice": 0,
            "maxPriceWithoutTax": 0,
            "currencyDecimalSeparator": ",",
            "currencyDigitsAfterDecimal": 3,
            "currencySymbol": "£",
            "formatted": {
                "withTax": "£9.99",
                "withoutTax": "£9.99",
                "tax": "£0.00"
            },
            "raw": {
                "withTax": 9.99,
                "withoutTax": 9.99,
                "tax": 0
            }
        },
        "subTotal": {
            "minPrice": 0,
            "minPriceWithoutTax": 0,
            "maxPrice": 0,
            "maxPriceWithoutTax": 0,
            "currencyDecimalSeparator": ",",
            "currencyDigitsAfterDecimal": 3,
            "currencySymbol": "£",
            "formatted": {
                "withTax": "£21.00",
                "withoutTax": "£21.00",
                "tax": "£0.00"
            },
            "raw": {
                "withTax": 21,
                "withoutTax": 21,
                "tax": 0
            }
        },
        "discount": {
            "minPrice": 0,
            "minPriceWithoutTax": 0,
            "maxPrice": 0,
            "maxPriceWithoutTax": 0,
            "currencyDecimalSeparator": ",",
            "currencyDigitsAfterDecimal": 3,
            "currencySymbol": "£",
            "formatted": {
                "withTax": "£0.00",
                "withoutTax": "£0.00",
                "tax": "£0.00"
            },
            "raw": {
                "withTax": 0,
                "withoutTax": 0,
                "tax": 0
            }
        },
        "balanceAmount": null,
        "paidAmount": null,
        "itemsBasic": [
            {
                "id": "3655d43e-52a0-ec11-b1ba-000d3a211cf7",
                "productId": "0C5B0111-CD9B-4FD1-97E6-06169DE51128",
                "stockCode": "BS000111-BLACK-6",
                "name": "Stylish Summer Jacket WHTSPOT2 BLACK 6 Colour",
                "manufacturer": "My Brand",
                "subManufacturer": "",
                "qty": 1,
                "displayOrder": 0,
                "image": "https://liveocxstorage.blob.core.windows.net/betterstore/products/tara_drop_one.jpg?fm=webp",
                "slug": "products/my-brand-stylish-summer-jacket-whtspot2-black-bs000111-black-4",
                "price": 11,
                "discountAmt": 0,
                "totalPrice": 11,
                "listPrice": 0,
                "priceWithoutTax": 0,
                "displayInBasket": false,
                "shippedQty": 0,
                "returnQty": 0,
                "availableQty": 0,
                "itemType": 0,
                "companyDiscount": null,
                "shortDescription": "<html>\n<head>\n\t<title></title>\n</head>\n<body></body>\n</html>\n",
                "isSubscription": false,
                "isMembership": false,
                "statusCode": null
            },
        ],
        "billingAddress": null,
        "shippingAddress": null,
        "shipping": null,
        "paymentMethod": null,
        "customerId": null,
        "currencyCode": "GBP",
        "currencySymbol": "£",
        "trackingNo": "",
        "trackingLink": "",
        "membershipPlanId": "00000000-0000-0000-0000-000000000000",
        "hasMembership": false,
        "membershipTotal": {
            "minPrice": 0,
            "minPriceWithoutTax": 0,
            "maxPrice": 0,
            "maxPriceWithoutTax": 0,
            "currencyDecimalSeparator": ",",
            "currencyDigitsAfterDecimal": 3,
            "currencySymbol": "£",
            "formatted": {
                "withTax": "£0.00",
                "withoutTax": "£0.00",
                "tax": "£0.00"
            },
            "raw": {
                "withTax": 0,
                "withoutTax": 0,
                "tax": 0
            }
        },
        "deliveryPlans": null,
        "orderType": 0,
        "carrierShippingMethodCode": "",
        "carrierShippingMethodName": "",
        "shippingMethodId": "3b9ba0d0-2669-462c-974a-bfcda4dcfebe"
    },
  
]
}

GET/api/v2/commerce/customer/:id/orders/:orderId

Order Detail.

This endpoint allows you to get order details.

Developers - API Operations:

OperationEndpointResponse
Get Orders/api/v2/commerce/customer/:id/orders/:orderIdGet Order Detail.

Required attributes

  • Name
    id
    Type
    string
    Description

    Id used as unique identifier for customer

  • Name
    orderId
    Type
    string
    Description

    Id used to identify the order

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    boolean
    Description

    Result of the response

  • Name
    id
    Type
    string
    Description

    Id used to identify the orders

  • Name
    orderNo
    Type
    string
    Description

    Order number of the order

  • Name
    orderDate
    Type
    string
    Description

    Date and time when the order was placed

  • Name
    orderStatus
    Type
    number
    Description

    Status of the order in numeric value

  • Name
    name
    Type
    string
    Description

    Name of the product to be returned

  • Name
    manufacturer
    Type
    string
    Description

    Name of the manufacturer of the product

  • Name
    subManufacturer
    Type
    string
    Description

    Name of the Sub-Manufacturer of the product

  • Name
    qty
    Type
    number
    Description

    Quantity of products in the orders

  • Name
    shippedQty
    Type
    number
    Description

    Quantity of shipped products

  • Name
    returnQty
    Type
    number
    Description

    Quantity of products that are returned

  • Name
    price
    Type
    string
    Description

    Price of the product

  • Name
    minPrice
    Type
    number
    Description

    Minimum price for the order

  • Name
    minPriceWithoutTax
    Type
    number
    Description

    Minimum price for the order without tax

  • Name
    maxPrice
    Type
    number
    Description

    Maximum price for the order

  • Name
    maxPriceWithoutTax
    Type
    number
    Description

    Maximum price for the order wihtout tax

  • Name
    currencyDecimalSeparator
    Type
    string
    Description

    Currency decimal separator for the region

  • Name
    currencyDigitsAfterDecimal
    Type
    number
    Description

    Digits after decimal for the currency

  • Name
    currencySymbol
    Type
    string
    Description

    Currency Symbol for Price e.g £

  • Name
    formatted
    Type
    object
    Description

    Formatted price with and without tax

  • Name
    withTax
    Type
    string
    Description

    Price of returned item with Tax

  • Name
    withoutTax
    Type
    string
    Description

    Price of returned item item without Tax

  • Name
    tax
    Type
    string
    Description

    Tax amount of returned item

  • Name
    raw
    Type
    object
    Description

    Raw price without discount

  • Name
    discountAmt
    Type
    object
    Description

    The amount of discount to be applied on the products in the return list

  • Name
    totalPrice
    Type
    object
    Description

    Total price of the product

  • Name
    slug
    Type
    string
    Description

    Slug of the product used to navigate to the product

  • Name
    image
    Type
    string
    Description

    File name/URL of the image of the returned product

  • Name
    currencyCode
    Type
    string
    Description

    Currency code according to the region e.g. GBP:'Great Britain Pound'

  • Name
    grandTotal
    Type
    object
    Description

    Grand total price of returned items

  • Name
    subTotal
    Type
    object
    Description

    Sub total of the returned items

  • Name
    shippingCharge
    Type
    object
    Description

    Shipping charges of the product to be returned

  • Name
    refundAmount
    Type
    object
    Description

    Amount to be refunded based on the items returned

  • Name
    refundCharge
    Type
    object
    Description

    Amount charged on product return refunds

  • Name
    createdByAdmin
    Type
    boolean
    Description

    Flag to check if the order is created by the admin

  • Name
    displayOrder
    Type
    number
    Description

    Display order of the product in the basket

  • Name
    itemType
    Type
    number
    Description

    Type of item in the basket

  • Name
    displayInBasket
    Type
    boolean
    Description

    Flag to check if the product should be displayed in the basket

  • Name
    companyDiscount
    Type
    object
    Description

    The discount given on the original price of the products by the company to their employees

  • Name
    stockCode
    Type
    string
    Description

    Stock code of the product

  • Name
    name
    Type
    string
    Description

    Name of the product

  • Name
    slug
    Type
    string
    Description

    Slug of the product used to navigate to the product

  • Name
    shortDescription
    Type
    string
    Description

    A short description of the product

  • Name
    isSubscription
    Type
    boolean
    Description

    Flag to check if the user has an active subscription

  • Name
    isMembership
    Type
    boolean
    Description

    Flag to check if the user has an active membership

  • Name
    balanceAmount
    Type
    object
    Description

    Amount remaining as balance to be paid

  • Name
    paidAmount
    Type
    object
    Description

    Amount already paid by the customer

  • Name
    itemsBasic
    Type
    array
    Description

    List of items with basic information about those items

  • Name
    billingAddress
    Type
    object
    Description

    Billing address of the customer

  • Name
    shippingAddress
    Type
    object
    Description

    Shipping address of the customer

  • Name
    shipping
    Type
    object
    Description

    Shipping details of the order

  • Name
    paymentMethod
    Type
    object
    Description

    Payment methods chosen by the customer to carry out the payments

  • Name
    customerId
    Type
    string
    Description

    Customer Id to identify the user

  • Name
    currencyCode
    Type
    string
    Description

    Currency code according to the region e.g. GBP:'Great Britain Pound'

  • Name
    currencySymbol
    Type
    string
    Description

    Currency Symbol for Price e.g £

  • Name
    trackingNo
    Type
    string
    Description

    Tracking number of the order used for tracking the delivery

  • Name
    trackingLink
    Type
    string
    Description

    Tracking link contains the URL for tracking the order

  • Name
    membershipPlanId
    Type
    string
    Description

    Id used to identify membership plans

  • Name
    hasMembership
    Type
    boolean
    Description

    Flag to check if the user has a membership

  • Name
    membershipTotal
    Type
    object
    Description

    Total cost of membership for the user

  • Name
    deliveryPlans
    Type
    object
    Description

    A list of delivery plans for the delivery of the order

  • Name
    orderType
    Type
    number
    Description

    Type of order as a numeric value

  • Name
    carrierShippingMethodCode
    Type
    string
    Description

    Code for the carrier shipping method

  • Name
    carrierShippingMethodName
    Type
    string
    Description

    Name of the carrier shipping method

  • Name
    shippingMethodId
    Type
    string
    Description

    Shipping method Id to identify the shipping method

  • Name
    promotions
    Type
    array
    Description

    List of promotions that can be applied on the order

  • Name
    items
    Type
    array
    Description

    The list of items to be delivered

  • Name
    id
    Type
    array
    Description

    Id used to identify the product

  • Name
    productId
    Type
    string
    Description

    Product Id used to identify the product

  • Name
    productIid
    Type
    string
    Description

    Product Iid used to identify the product

  • Name
    parentProductId
    Type
    string
    Description

    Id of the parent product product, used to map personalized products with their parent product

  • Name
    price
    Type
    string
    Description

    Price of the product

  • Name
    totalPrice
    Type
    object
    Description

    Total price of the product

  • Name
    minPrice
    Type
    number
    Description

    Minimum price for the product

  • Name
    minPriceWithoutTax
    Type
    number
    Description

    Minimum price for the product without tax

  • Name
    maxPrice
    Type
    number
    Description

    Maximum price for the product

  • Name
    maxPriceWithoutTax
    Type
    number
    Description

    Maximum price for the company wihtout tax

  • Name
    currencyDecimalSeparator
    Type
    string
    Description

    Currency decimal separator for the region

  • Name
    currencyDigitsAfterDecimal
    Type
    number
    Description

    Digits after decimal for the currency

  • Name
    currencySymbol
    Type
    string
    Description

    Currency Symbol for Price e.g £

  • Name
    formatted
    Type
    object
    Description

    Formatted price with and without tax

  • Name
    withTax
    Type
    string
    Description

    Price of basket item with Tax

  • Name
    withoutTax
    Type
    string
    Description

    Price of basket item without Tax

  • Name
    tax
    Type
    string
    Description

    Tax amount of basket item

  • Name
    raw
    Type
    object
    Description

    Raw price without discount

  • Name
    discountAmt
    Type
    object
    Description

    The amount of discount to be applied on the products in the basket

  • Name
    shippedQty
    Type
    number
    Description

    Quantity of shipped products

  • Name
    totalPrice
    Type
    object
    Description

    Total price of the product

  • Name
    image
    Type
    string
    Description

    URL of the image of the product

  • Name
    availableQty
    Type
    number
    Description

    Available quantity of the product in stock

  • Name
    slug
    Type
    string
    Description

    Slug of the product used to navigate to the product

  • Name
    categoryItems
    Type
    array
    Description

    List of all the categories available

  • Name
    categoryId
    Type
    string
    Description

    Category Id to identify the cateogories

  • Name
    categoryName
    Type
    string
    Description

    Name of the category e.g. 'Shirts','Joggers', etc

  • Name
    parentCategoryId
    Type
    string
    Description

    Parent category Id to identify the parent category

  • Name
    parentCategoryName
    Type
    string
    Description

    Name of the Parent category e.g. 'Clothings'

  • Name
    customInfo1
    Type
    string
    Description

    Custom Information of the product in the basket

  • Name
    customInfo2
    Type
    string
    Description

    Custom Information of the product in the basket

  • Name
    customInfo3
    Type
    string
    Description

    Custom Information of the product in the basket

  • Name
    customInfo4
    Type
    string
    Description

    Custom Information of the product in the basket

  • Name
    customInfo5
    Type
    string
    Description

    Custom Information of the product in the basket

  • Name
    customInfo1Formatted
    Type
    string
    Description

    New Custom information about the product given by the user to be updated

  • Name
    customInfo2Formatted
    Type
    string
    Description

    New Custom information about the product given by the user to be updated

  • Name
    customInfo3Formatted
    Type
    string
    Description

    New Custom information about the product given by the user to be updated

  • Name
    customInfo4Formatted
    Type
    string
    Description

    New Custom information about the product given by the user to be updated

  • Name
    customInfo5Formatted
    Type
    string
    Description

    New Custom information about the product given by the user to be updated

  • Name
    additionalCharge
    Type
    object
    Description

    Additional charges applied on the product

  • Name
    parentProductId
    Type
    string
    Description

    Id used to identify the parent product of the current product

  • Name
    itemType
    Type
    number
    Description

    Type of item in the basket

  • Name
    displayInBasket
    Type
    boolean
    Description

    Flag to check if the product should be displayed in the basket

  • Name
    companyDiscount
    Type
    object
    Description

    The discount given on the original price of the products by the company to their employees

  • Name
    listPrice
    Type
    string
    Description

    Price of the products in the list

  • Name
    shortDescription
    Type
    string
    Description

    Short description of the product

  • Name
    isSubscription
    Type
    boolean
    Description

    Flag to check if the user has an active subscription

  • Name
    isGiftWrapApplied
    Type
    boolean
    Description

    Flag to check if Gift wrap is applied to the products

  • Name
    giftWrapId
    Type
    string
    Description

    Gift wrap Id to identify the gift warpped products in the basket

  • Name
    giftWrapConfig
    Type
    string
    Description

    The gift wrapping options available for the products in the basket

  • Name
    couponProvider
    Type
    string
    Description

    The entity that provides the coupon to create an offer

  • Name
    priceMatchReqId
    Type
    string
    Description

    Id used to match the price requests

  • Name
    isMembership
    Type
    boolean
    Description

    Flag to check if the user has an active membership

  • Name
    priceWithoutTax
    Type
    object
    Description

    Price of the product without tax

  • Name
    externalStatus
    Type
    string
    Description

    External status of the order

  • Name
    status
    Type
    number
    Description

    Status of the product as a numeric value

  • Name
    statusCode
    Type
    string
    Description

    Status code of the product

  • Name
    shipping
    Type
    object
    Description

    Shipping details for the order

  • Name
    id
    Type
    string
    Description

    Id to identify the shipping method

  • Name
    enabled
    Type
    boolean
    Description

    Flag to check if the shipping method is enabled

  • Name
    systemName
    Type
    string
    Description

    System name of the shipping methods

  • Name
    shippingCode
    Type
    string
    Description

    Shipping code used by the shipping method

  • Name
    displayName
    Type
    string
    Description

    Display name of the shipping method

  • Name
    description
    Type
    string
    Description

    Description of the shipping method

  • Name
    displayOrder
    Type
    number
    Description

    Display order of this shipping method in the list of shipping methods

  • Name
    expectedDaysToDeliver
    Type
    number
    Description

    Number of days before the expected delivery date

  • Name
    expectedDeliveryDate
    Type
    string
    Description

    Date and time of expected delivery of the product

  • Name
    deliveryOnOrBefore
    Type
    string
    Description

    The date on or before which date the product should be delivered

  • Name
    isDefault
    Type
    boolean
    Description

    Flag to check if this shipping method is the default shipping method

  • Name
    isNominated
    Type
    boolean
    Description

    Flag to check if this shipping method is the nominated shipping method

  • Name
    type
    Type
    number
    Description

    Type of this shipping mehtod

  • Name
    carrierCode
    Type
    string
    Description

    Carrier code of the delivery carrier

  • Name
    countryCode
    Type
    string
    Description

    Country code of the region of delivery

  • Name
    isPriceOnRequest
    Type
    boolean
    Description

    Flag to check if product is produced only for editorials and is never actually put into production for consumer purchase

  • Name
    showRecomendation
    Type
    boolean
    Description

    Flag to check if the recommendations for this product should be shown

  • Name
    recomendation
    Type
    string
    Description

    The recommendations for this product

  • Name
    isTaxable
    Type
    boolean
    Description

    Flag to check if this shipping method is taxable

  • Name
    shippingCostMethod
    Type
    number
    Description

    Used to select the type of shipping cost to be applied

  • Name
    cutOffTimes
    Type
    string
    Description

    It is the latest time in any Business Day that we can process a particular Transaction, request or instruction on that Business Day.

  • Name
    countryCsv
    Type
    string
    Description

    File name for the csv file having data of the countries

  • Name
    paymentMethod
    Type
    object
    Description

    Payment methods chosen by the customer to carry out the payments

  • Name
    payment
    Type
    object
    Description

    Payment object containing the details of payment

  • Name
    payments
    Type
    array
    Description

    Payments made by the user for the order

  • Name
    id
    Type
    string
    Description

    Payment Id to identify payment records

  • Name
    cardNo
    Type
    string
    Description

    Card number of the customer

  • Name
    orderNo
    Type
    number
    Description

    Order number of the payment

  • Name
    orderAmount
    Type
    number
    Description

    Order amount to be paid

  • Name
    paidAmount
    Type
    number
    Description

    Amount already paid by the customer

  • Name
    balanceAmount
    Type
    number
    Description

    Amount left ot be paid by the customer

  • Name
    isValid
    Type
    boolean
    Description

    Flag to check the validity of the payment

  • Name
    status
    Type
    number
    Description

    Status of payment as a numeric value

  • Name
    authCode
    Type
    string
    Description

    Authentication code of the payment

  • Name
    issuerUrl
    Type
    string
    Description

    URL to visit the payment issue

  • Name
    paRequest
    Type
    string
    Description

    Payment request created for payment

  • Name
    pspSessionCookie
    Type
    string
    Description

    Payment srvice provider session cookie

  • Name
    pspResponseCode
    Type
    string
    Description

    Payment service provider response code

  • Name
    pspResponseMessage
    Type
    string
    Description

    Payment service provider response message

  • Name
    paymentGatewayId
    Type
    number
    Description

    Id used to identify the payment payment Gateway

  • Name
    paymentGateway
    Type
    string
    Description

    Name of the payment gateway

  • Name
    token
    Type
    string
    Description

    Token generated during the payment

  • Name
    payerId
    Type
    string
    Description

    Customer's payment Id used to identify the payer

  • Name
    cvcResult
    Type
    string
    Description

    Result of payment request from Central Vigilance Commission

  • Name
    avsResult
    Type
    string
    Description

    Result of the payment request from Address Verification Service

  • Name
    secure3DResult
    Type
    string
    Description

    Result of the payment request from secure 3D

  • Name
    cardHolderName
    Type
    string
    Description

    Card holder's name mentioned on the card used for payment

  • Name
    issuerCountry
    Type
    string
    Description

    Country name that has issued the card to the customer

  • Name
    info1
    Type
    string
    Description

    Information about the card

  • Name
    fraudScore
    Type
    string
    Description

    Fraud score of the customer making the payment

  • Name
    paymentMethod
    Type
    string
    Description

    Name of the paymenth method used for payment

  • Name
    cardType
    Type
    string
    Description

    Type of card used for making payment

  • Name
    operatorId
    Type
    string
    Description

    Id used to identify the operator for payment

  • Name
    refStoreId
    Type
    string
    Description

    Reference store Id used to identify the reference stores

  • Name
    externalRefNo
    Type
    string
    Description

    External reference number

  • Name
    expiryYear
    Type
    string
    Description

    Expiry year of the card used for payment

  • Name
    expiryMonth
    Type
    string
    Description

    Expiry month of the card used for payment

  • Name
    upFrontPayment
    Type
    boolean
    Description

    Flag to check if the payment is made upfront

  • Name
    upFrontAmount
    Type
    number
    Description

    Amount paid upfront for the purchase

  • Name
    upFrontTerm
    Type
    number
    Description

    Term of upfront payment

  • Name
    isPrePaid
    Type
    boolean
    Description

    Flag to check if the order is pre paid or not

  • Name
    customer
    Type
    object
    Description

    Object conatining details of the customer

  • Name
    userId
    Type
    string
    Description

    User Id to identify the User

  • Name
    username
    Type
    string
    Description

    Username of the user

  • Name
    email
    Type
    string
    Description

    Email of the company

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    companyId
    Type
    string
    Description

    Company Id to identify the company

  • Name
    companyName
    Type
    string
    Description

    Name of the company provided by the user

  • Name
    companyRegNo
    Type
    string
    Description

    Registration number of the company

  • Name
    companyTaxRegNo
    Type
    string
    Description

    Tax registration number of the company

  • Name
    basketId
    Type
    string
    Description

    Basket Id to identify the basket

  • Name
    customerId
    Type
    string
    Description

    Customer Id to identify the user

  • Name
    trackingNo
    Type
    string
    Description

    Tracking number of the order used for tracking the delivery

  • Name
    trackingLink
    Type
    string
    Description

    Tracking link contains the URL for tracking the order

  • Name
    hasSubscription
    Type
    boolean
    Description

    Flag to check if the user has a subscription

  • Name
    isRecurringOrder
    Type
    boolean
    Description

    Flag to check if the order is a recurring order

  • Name
    isSeedOrder
    Type
    boolean
    Description

    Flag to check if the order is a seed order

  • Name
    seedOrderId
    Type
    string
    Description

    Id used to identify the seed Order for subscription fulfuilment order

  • Name
    subscriptionPlanId
    Type
    string
    Description

    Plan Id of the subscription

  • Name
    subscriptionTotal
    Type
    object
    Description

    The total amount that must be paid by the user for the subscription

  • Name
    refStoreId
    Type
    string
    Description

    Reference Id of the store

  • Name
    shippingPlanId
    Type
    string
    Description

    Shipping plan Id used to identify the shipping plan

  • Name
    shipmentDate
    Type
    string
    Description

    Date and time when the order is shipped

  • Name
    customNo
    Type
    string
    Description

    Customer number assigned to the order

  • Name
    exchangeRate
    Type
    number
    Description

    Exchange rate of the currency

  • Name
    baseCurrency
    Type
    string
    Description

    Base currency of the region

  • Name
    microSiteId
    Type
    string
    Description

    Micro site Id of the site

  • Name
    emailexternalAccountingId
    Type
    string
    Description

    External accounting Email Id

  • Name
    taxPercent
    Type
    number
    Description

    Amount of tax applied in percentage

  • Name
    createdBy
    Type
    string
    Description

    Name of the user who created of the quote

  • Name
    createdByAdmin
    Type
    boolean
    Description

    Flag to check if the basket is created by Admin

  • Name
    shippingCharge
    Type
    object
    Description

    Shipping charges of the product to be returned

  • Name
    grandTotal
    Type
    object
    Description

    Grand total price of returned items

  • Name
    subTotal
    Type
    object
    Description

    Sub total of the returned items

  • Name
    discount
    Type
    object
    Description

    Discount amount on the order item

  • Name
    paidAmount
    Type
    object
    Description

    Amount already paid by the customer

  • Name
    balanceAmount
    Type
    object
    Description

    Amount left ot be paid by the customer

  • Name
    itemsBasic
    Type
    array
    Description

    List of items with basic information about those items

  • Name
    billingAddress
    Type
    object
    Description

    Billing address of the customer

  • Name
    isDefault
    Type
    boolean
    Description

    Flag to check if the address is default address

  • Name
    isDefaultDelivery
    Type
    boolean
    Description

    Flag to check if the addresss is default delivery address

  • Name
    isDefaultForSubscription
    Type
    boolean
    Description

    Flag to check if the address is default

  • Name
    isDefaultBilling
    Type
    boolean
    Description

    Flag to check if the address is default billing address

  • Name
    id
    Type
    string
    Description

    id to identify the user

  • Name
    title
    Type
    string
    Description

    Title of the user e.g. Miss./Mrs./Mr.

  • Name
    firstName
    Type
    string
    Description

    First name of the user

  • Name
    lastName
    Type
    string
    Description

    Last name of the user

  • Name
    address1
    Type
    string
    Description

    Address Line 1 provided by the user

  • Name
    address2
    Type
    string
    Description

    Address Line 2 provided by the user

  • Name
    address3
    Type
    string
    Description

    Address Line 3 provided by the user

  • Name
    city
    Type
    string
    Description

    City name provided by the user

  • Name
    state
    Type
    string
    Description

    State name provided by the user

  • Name
    country
    Type
    string
    Description

    Country name provided by the user

  • Name
    countryCode
    Type
    string
    Description

    Country code provided by the user

  • Name
    postCode
    Type
    string
    Description

    Post code provided by the user

  • Name
    phoneNo
    Type
    string
    Description

    Phone number of the user

  • Name
    mobileNo
    Type
    string
    Description

    Mobile number of the user

  • Name
    companyName
    Type
    string
    Description

    Name of the company provided by the user

  • Name
    shippingAddress
    Type
    object
    Description

    Shipping address of the customer

  • Name
    snippets
    Type
    array
    Description

    A list of snippets that can be added to the site

  • Name
    slugType
    Type
    number
    Description

    Type of slug of the basket

Request

GET
/api/v2/commerce/customer/:id/orders/:orderId
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/customer/:id/orders/:orderId' \
--header 'Accept: application/json' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; 
ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'

Response

{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": null,
"messageCode": null,
"result": {
    "promotions": [],
    "items": [
        {
            "id": "08660706-b7a3-ec11-b1ba-000d3a211cf7",
            "productId": "EE7BC92E-E2E7-472D-8670-AD5E0048CA5D",
            "productIId": "0",
            "stockCode": "BS212729-WHTFLRL-14",
            "name": "White Floral Broderie Mini Dress with Tie Shoulder 14 Colour",
            "manufacturer": "My Brand",
            "subManufacturer": "",
            "qty": 1,
            "displayOrder": 1,
            "price": {
                "minPrice": 0,
                "minPriceWithoutTax": 0,
                "maxPrice": 0,
                "maxPriceWithoutTax": 0,
                "currencyDecimalSeparator": ",",
                "currencyDigitsAfterDecimal": 3,
                "currencySymbol": "£",
                "formatted": {
                    "withTax": "£79.99",
                    "withoutTax": "£66.66",
                    "tax": "£13.33"
                },
                "raw": {
                    "withTax": 79.99,
                    "withoutTax": 66.66,
                    "tax": 13.33
                }
            },
            "discountAmt": {
                "minPrice": 0,
                "minPriceWithoutTax": 0,
                "maxPrice": 0,
                "maxPriceWithoutTax": 0,
                "currencyDecimalSeparator": ",",
                "currencyDigitsAfterDecimal": 3,
                "currencySymbol": "£",
                "formatted": {
                    "withTax": "£0.00",
                    "withoutTax": "£0.00",
                    "tax": "£0.00"
                },
                "raw": {
                    "withTax": 0,
                    "withoutTax": 0,
                    "tax": 0
                }
            },
            "shippedQty": 0,
            "totalPrice": {
                "minPrice": 0,
                "minPriceWithoutTax": 0,
                "maxPrice": 0,
                "maxPriceWithoutTax": 0,
                "currencyDecimalSeparator": ",",
                "currencyDigitsAfterDecimal": 3,
                "currencySymbol": "£",
                "formatted": {
                    "withTax": "£79.99",
                    "withoutTax": "£66.66",
                    "tax": "£13.33"
                },
                "raw": {
                    "withTax": 79.99,
                    "withoutTax": 66.6583,
                    "tax": 13.3317
                }
            },
            "image": "https://liveocxcdn.azureedge.net/betterstore/fu_spring_0280.jpg?fm=webp",
            "availableQty": 0,
            "slug": "products/my-brand-white-floral-broderie-mini-dress-with-tie-shoulder-bs212729-whtflrl-12",
            "categoryItems": [
                {
                    "categoryId": "24e3168a-7c53-4f1e-adb5-a8725bc43f1b",
                    "categoryName": "Dresses",
                    "parentCategoryId": null,
                    "parentCategoryName": "Clothing"
                },
                {
                    "categoryId": "ab002119-6095-46bc-a308-6ece71b26fc0",
                    "categoryName": "Clothing",
                    "parentCategoryId": null,
                    "parentCategoryName": ""
                }
            ],
            "customInfo1": "",
            "customInfo2": "",
            "customInfo3": "",
            "customInfo4": "",
            "customInfo5": "",
            "customInfo1Formatted": "",
            "customInfo2Formatted": "",
            "customInfo3Formatted": "",
            "customInfo4Formatted": "",
            "customInfo5Formatted": "",
            "additionalCharge": {
                "minPrice": 0,
                "minPriceWithoutTax": 0,
                "maxPrice": 0,
                "maxPriceWithoutTax": 0,
                "currencyDecimalSeparator": ",",
                "currencyDigitsAfterDecimal": 3,
                "currencySymbol": "£",
                "formatted": {
                    "withTax": "£0.00",
                    "withoutTax": "£0.00",
                    "tax": "£0.00"
                },
                "raw": {
                    "withTax": 0,
                    "withoutTax": 0,
                    "tax": 0
                }
            },
            "parentProductId": "00000000-0000-0000-0000-000000000000",
            "itemType": 1,
            "displayInBasket": false,
            "companyDiscount": {
                "minPrice": 0,
                "minPriceWithoutTax": 0,
                "maxPrice": 0,
                "maxPriceWithoutTax": 0,
                "currencyDecimalSeparator": ",",
                "currencyDigitsAfterDecimal": 3,
                "currencySymbol": "£",
                "formatted": {
                    "withTax": "£0.00",
                    "withoutTax": "£0.00",
                    "tax": "£0.00"
                },
                "raw": {
                    "withTax": 0,
                    "withoutTax": 0,
                    "tax": 0
                }
            },
            "listPrice": {
                "minPrice": 0,
                "minPriceWithoutTax": 0,
                "maxPrice": 0,
                "maxPriceWithoutTax": 0,
                "currencyDecimalSeparator": ",",
                "currencyDigitsAfterDecimal": 3,
                "currencySymbol": "£",
                "formatted": {
                    "withTax": "£79.99",
                    "withoutTax": "£79.99",
                    "tax": "£0.00"
                },
                "raw": {
                    "withTax": 79.99,
                    "withoutTax": 79.99,
                    "tax": 0
                }
            },
            "shortDescription": "<html>\n<head>\n\t<title></title>\n</head>\n<body></body>\n</html>\n",
            "isSubscription": false,
            "isGiftWrapApplied": false,
            "giftWrapId": null,
            "giftWrapConfig": null,
            "couponProvider": "",
            "priceMatchReqId": "00000000-0000-0000-0000-000000000000",
            "isMembership": false,
            "priceWithoutTax": {
                "minPrice": 0,
                "minPriceWithoutTax": 0,
                "maxPrice": 0,
                "maxPriceWithoutTax": 0,
                "currencyDecimalSeparator": ",",
                "currencyDigitsAfterDecimal": 3,
                "currencySymbol": "£",
                "formatted": {
                    "withTax": "£66.66",
                    "withoutTax": "£66.66",
                    "tax": "£0.00"
                },
                "raw": {
                    "withTax": 66.6583,
                    "withoutTax": 66.6583,
                    "tax": 0
                }
            },
            "externalStatus": "",
            "status": 0,
            "statusCode": null
        }
    ],
    "shipping": {
        "id": "3b9ba0d0-2669-462c-974a-bfcda4dcfebe",
        "enabled": false,
        "systemName": null,
        "shippingCode": "",
        "displayName": "Standard Shipping",
        "description": null,
        "displayOrder": 0,
        "expectedDaysToDeliver": 0,
        "expectedDeliveryDate": "0001-01-01T00:00:00",
        "deliveryOnOrBefore": null,
        "price": {
            "minPrice": 0,
            "minPriceWithoutTax": 0,
            "maxPrice": 0,
            "maxPriceWithoutTax": 0,
            "currencyDecimalSeparator": null,
            "currencyDigitsAfterDecimal": 0,
            "currencySymbol": "£",
            "formatted": {
                "withTax": "£0.00",
                "withoutTax": "£0.00",
                "tax": "£0.00"
            },
            "raw": {
                "withTax": 0,
                "withoutTax": 0,
                "tax": 0
            }
        },
        "isDefault": false,
        "isNominated": false,
        "type": 2,
        "carrierCode": null,
        "countryCode": null,
        "isPriceOnRequest": false,
        "showRecomendation": false,
        "recomendation": null,
        "isTaxable": false,
        "shippingCostMethod": 0,
        "cutOffTimes": null,
        "countryCsv": null
    },
    "paymentMethod": null,
    "payment": null,
    "payments": [
        {
            "id": "612109",
            "cardNo": "",
            "orderNo": 93186,
            "orderAmount": 89.98,
            "paidAmount": 89.98,
            "balanceAmount": 0,
            "isValid": true,
            "status": 2,
            "authCode": "",
            "issuerUrl": "",
            "paRequest": "",
            "pspSessionCookie": "",
            "pspResponseCode": "",
            "pspResponseMessage": "",
            "paymentGatewayId": 21,
            "paymentGateway": "Stripe",
            "token": "",
            "payerId": null,
            "cvcResult": "",
            "avsResult": "",
            "secure3DResult": "",
            "cardHolderName": "",
            "issuerCountry": "",
            "info1": "",
            "fraudScore": "",
            "paymentMethod": "Stripe",
            "cardType": null,
            "operatorId": "",
            "refStoreId": "",
            "tillNumber": "",
            "externalRefNo": "",
            "expiryYear": "0",
            "expiryMonth": "0",
            "isMoto": false,
            "upFrontPayment": false,
            "upFrontAmount": 0,
            "upFrontTerm": 0,
            "isPrePaid": false,
            "refundAmount": 0
        }
    ],
    "customer": {
        "userId": "79db110c-e22d-4b26-b565-ae530043dea1",
        "username": "abc@abc.com",
        "firstName": "Vikram",
        "lastName": "Saxena",
        "email": "abc@abc.com",
        "companyId": "00000000-0000-0000-0000-000000000000",
        "companyName": "",
        "companyRegNo": "",
        "companyTaxRegNo": ""
    },
    "basketId": "15df8b27-0d74-479e-b285-218b5313300b",
    "customerId": "79db110c-e22d-4b26-b565-ae530043dea1",
    "currencyCode": "GBP",
    "currencySymbol": "£",
    "customInfo1": "",
    "customInfo2": "",
    "customInfo3": "",
    "customInfo4": "",
    "customInfo5": "",
    "additionalCharge": {
        "minPrice": 0,
        "minPriceWithoutTax": 0,
        "maxPrice": 0,
        "maxPriceWithoutTax": 0,
        "currencyDecimalSeparator": ",",
        "currencyDigitsAfterDecimal": 3,
        "currencySymbol": "£",
        "formatted": {
            "withTax": "£0.00",
            "withoutTax": "£0.00",
            "tax": "£0.00"
        },
        "raw": {
            "withTax": 0,
            "withoutTax": 0,
            "tax": 0
        }
    },
    "companyDiscount": {
        "minPrice": 0,
        "minPriceWithoutTax": 0,
        "maxPrice": 0,
        "maxPriceWithoutTax": 0,
        "currencyDecimalSeparator": ",",
        "currencyDigitsAfterDecimal": 3,
        "currencySymbol": "£",
        "formatted": {
            "withTax": "£0.00",
            "withoutTax": "£0.00",
            "tax": "£0.00"
        },
        "raw": {
            "withTax": 0,
            "withoutTax": 0,
            "tax": 0
        }
    },
    "trackingNo": "",
    "trackingLink": "",
    "hasSubscription": false,
    "isRecurringOrder": false,
    "isSeedOrder": false,
    "seedOrderId": "00000000-0000-0000-0000-000000000000",
    "subscriptionPlanId": "00000000-0000-0000-0000-000000000000",
    "subscriptionTotal": {
        "minPrice": 0,
        "minPriceWithoutTax": 0,
        "maxPrice": 0,
        "maxPriceWithoutTax": 0,
        "currencyDecimalSeparator": ",",
        "currencyDigitsAfterDecimal": 3,
        "currencySymbol": "£",
        "formatted": {
            "withTax": "£0.00",
            "withoutTax": "£0.00",
            "tax": "£0.00"
        },
        "raw": {
            "withTax": 0,
            "withoutTax": 0,
            "tax": 0
        }
    },
    "refStoreId": "",
    "tillNumber": "",
    "externalRefNo": "",
    "isPrepaid": false,
    "externalStatus": "",
    "shippingPlanId": "",
    "shipmentDate": "0001-01-01T00:00:00",
    "customNo": null,
    "exchangeRate": 0,
    "baseCurrency": "GBP",
    "microSiteId": "00000000-0000-0000-0000-000000000000",
    "rmAs": [],
    "externalAccountingId": "",
    "id": "07660706-b7a3-ec11-b1ba-000d3a211cf7",
    "orderNo": "SO93186",
    "orderDate": "2022-03-14T16:51:42.71",
    "orderStatus": "Approved",
    "grandTotal": {
        "minPrice": 0,
        "minPriceWithoutTax": 0,
        "maxPrice": 0,
        "maxPriceWithoutTax": 0,
        "currencyDecimalSeparator": ",",
        "currencyDigitsAfterDecimal": 3,
        "currencySymbol": "£",
        "formatted": {
            "withTax": "£89.98",
            "withoutTax": "£74.98",
            "tax": "£15.00"
        },
        "raw": {
            "withTax": 89.98,
            "withoutTax": 74.9834,
            "tax": 14.9966
        }
    },
    "taxPercent": 20,
    "createdBy": "abc@abc.com",
    "createdByAdmin": false,
    "shippingCharge": {
        "minPrice": 0,
        "minPriceWithoutTax": 0,
        "maxPrice": 0,
        "maxPriceWithoutTax": 0,
        "currencyDecimalSeparator": ",",
        "currencyDigitsAfterDecimal": 3,
        "currencySymbol": "£",
        "formatted": {
            "withTax": "£9.99",
            "withoutTax": "£8.33",
            "tax": "£1.67"
        },
        "raw": {
            "withTax": 9.99,
            "withoutTax": 8.325,
            "tax": 1.665
        }
    },
    "subTotal": {
        "minPrice": 0,
        "minPriceWithoutTax": 0,
        "maxPrice": 0,
        "maxPriceWithoutTax": 0,
        "currencyDecimalSeparator": ",",
        "currencyDigitsAfterDecimal": 3,
        "currencySymbol": "£",
        "formatted": {
            "withTax": "£79.99",
            "withoutTax": "£66.66",
            "tax": "£13.33"
        },
        "raw": {
            "withTax": 79.99,
            "withoutTax": 66.6584,
            "tax": 13.3316
        }
    },
    "discount": {
        "minPrice": 0,
        "minPriceWithoutTax": 0,
        "maxPrice": 0,
        "maxPriceWithoutTax": 0,
        "currencyDecimalSeparator": ",",
        "currencyDigitsAfterDecimal": 3,
        "currencySymbol": "£",
        "formatted": {
            "withTax": "£0.00",
            "withoutTax": "£0.00",
            "tax": "£0.00"
        },
        "raw": {
            "withTax": 0,
            "withoutTax": 0,
            "tax": 0
        }
    },
    "balanceAmount": {
        "minPrice": 0,
        "minPriceWithoutTax": 0,
        "maxPrice": 0,
        "maxPriceWithoutTax": 0,
        "currencyDecimalSeparator": ",",
        "currencyDigitsAfterDecimal": 3,
        "currencySymbol": "£",
        "formatted": {
            "withTax": "£0.00",
            "withoutTax": "£0.00",
            "tax": "£0.00"
        },
        "raw": {
            "withTax": 0,
            "withoutTax": 0,
            "tax": 0
        }
    },
    "paidAmount": {
        "minPrice": 0,
        "minPriceWithoutTax": 0,
        "maxPrice": 0,
        "maxPriceWithoutTax": 0,
        "currencyDecimalSeparator": ",",
        "currencyDigitsAfterDecimal": 3,
        "currencySymbol": "£",
        "formatted": {
            "withTax": "£89.98",
            "withoutTax": "£89.98",
            "tax": "£0.00"
        },
        "raw": {
            "withTax": 89.98,
            "withoutTax": 89.98,
            "tax": 0
        }
    },
    "itemsBasic": null,
    "billingAddress": {
        "customerId": null,
        "isDefault": false,
        "isDefaultDelivery": false,
        "isDefaultForSubscription": false,
        "isDefaultBilling": false,
        "id": 0,
        "title": "",
        "firstName": "Vikram",
        "lastName": "Saxena",
        "address1": "Congress House, 14 Lyon Road,",
        "address2": "",
        "address3": null,
        "city": "London",
        "state": "",
        "country": null,
        "countryCode": "GB",
        "postCode": "HA12E",
        "phoneNo": "0203129272",
        "mobileNo": null,
        "companyName": ""
    },
    "shippingAddress": {
        "customerId": null,
        "isDefault": false,
        "isDefaultDelivery": false,
        "isDefaultForSubscription": false,
        "isDefaultBilling": false,
        "id": 0,
        "title": "",
        "firstName": "Vikram",
        "lastName": "Saxena",
        "address1": "Congress House, 14 Lyon Road,",
        "address2": "",
        "address3": "",
        "city": "London",
        "state": "",
        "country": null,
        "countryCode": "GB",
        "postCode": "HA12E",
        "phoneNo": "0203129272",
        "mobileNo": null,
        "companyName": ""
    },
    "membershipPlanId": "00000000-0000-0000-0000-000000000000",
    "hasMembership": false,
    "membershipTotal": null,
    "deliveryPlans": [],
    "orderType": 0,
    "carrierShippingMethodCode": "",
    "carrierShippingMethodName": "",
    "shippingMethodId": "00000000-0000-0000-0000-000000000000"
},
"snippets": null,
"slugType": 0
}

GET/api/v2/commerce/customer/:id/returns

Get list of returns for customer.

This endpoint allows you to get a list of returns for customer.

Developers - API Operations:

OperationEndpointResponse
Get Returns/api/v2/commerce/customer/:id/returnsGet list of returns for customer.

Required attributes

  • Name
    id
    Type
    string
    Description

    Id used to identify the user

Response Properties

  • Name
    statusCode
    Type
    number
    Description

    Status code of the response

  • Name
    status
    Type
    string
    Description

    Status of the response

  • Name
    errors
    Type
    array
    Description

    List of errors in the response

  • Name
    success
    Type
    boolean
    Description

    Success status of the response

  • Name
    message
    Type
    string
    Description

    Message of the response

  • Name
    messageCode
    Type
    string
    Description

    Message code of the response

  • Name
    result
    Type
    boolean
    Description

    Result of the response

  • Name
    returnId
    Type
    string
    Description

    Id used to identify the returns initiated by the user

  • Name
    returnNo
    Type
    string
    Description

    Return Number used to differentiate between return requests

  • Name
    returnDate
    Type
    string
    Description

    Date and time of return request for the product

  • Name
    returnRequestedBy
    Type
    string
    Description

    Username / Email id of the user who initiated the return request

  • Name
    email
    Type
    string
    Description

    Email id of the user

  • Name
    returnStatusLabel
    Type
    string
    Description

    Label holding the status of return request, e.g. 'ReturnRequested'

  • Name
    returnStatus
    Type
    number
    Description

    Status of return request as numeric value

  • Name
    reasonForReturn
    Type
    string
    Description

    Message holding the reason for returning the product

  • Name
    requiredAction
    Type
    string
    Description

    Action required after the return request has been initiated

  • Name
    comment
    Type
    string
    Description

    Comments added by the user regarding the product

  • Name
    orderId
    Type
    string
    Description

    Order Id of the order

  • Name
    orderNumber
    Type
    string
    Description

    Order number of the order

  • Name
    orderDate
    Type
    string
    Description

    Date and time when the order was placed

  • Name
    orderStatus
    Type
    number
    Description

    Status of the order in numeric value

  • Name
    orderStatusLabel
    Type
    string
    Description

    Label holding the status of the order

  • Name
    lineItems
    Type
    array
    Description

    Array of all the products in the return list

  • Name
    recordId
    Type
    string
    Description

    Record Id to identify the record

  • Name
    productId
    Type
    string
    Description

    Id used to identify the product

  • Name
    stockCode
    Type
    string
    Description

    Stock code of the product

  • Name
    name
    Type
    string
    Description

    Name of the product to be returned

  • Name
    manufacturer
    Type
    string
    Description

    Name of the manufacturer of the product

  • Name
    subManufacturer
    Type
    string
    Description

    Name of the Sub-Manufacturer of the product

  • Name
    orderQty
    Type
    number
    Description

    Quantity of products in the orders

  • Name
    shippedQty
    Type
    number
    Description

    Quantity of shipped products

  • Name
    returnQtyRequested
    Type
    number
    Description

    Quantity of products that are requested to be returned

  • Name
    returnQtyRecd
    Type
    number
    Description

    Amount of returned products received

  • Name
    price
    Type
    string
    Description

    Price of the product

  • Name
    currencySymbol
    Type
    string
    Description

    Currency Symbol for Price e.g £

  • Name
    formatted
    Type
    object
    Description

    Formatted price with and without tax

  • Name
    withTax
    Type
    string
    Description

    Price of returned item with Tax

  • Name
    withoutTax
    Type
    string
    Description

    Price of returned item item without Tax

  • Name
    tax
    Type
    string
    Description

    Tax amount of returned item

  • Name
    raw
    Type
    object
    Description

    Raw price without discount

  • Name
    discountAmt
    Type
    object
    Description

    The amount of discount to be applied on the products in the return list

  • Name
    totalPrice
    Type
    object
    Description

    Total price of the product

  • Name
    slug
    Type
    string
    Description

    Slug of the product used to navigate to the product

  • Name
    image
    Type
    string
    Description

    File name/URL of the image of the returned product

  • Name
    currencyCode
    Type
    string
    Description

    Currency code according to the region e.g. GBP:'Great Britain Pound'

  • Name
    grandTotal
    Type
    object
    Description

    Grand total price of returned items

  • Name
    subTotal
    Type
    object
    Description

    Sub total of the returned items

  • Name
    shippingCharge
    Type
    object
    Description

    Shipping charges of the product to be returned

Request

GET
/api/v2/commerce/customer/:id/returns
curl --location 'https://api20.bettercommerce.io/api/v2/commerce/customer/:id/returns' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; 
ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'

Response

{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": null,
"messageCode": null,
"result": [
    {
        "returnId": "95c122e0-3701-4852-957a-ae5a00b4c37a",
        "returnNo": "RMA00013",
        "returnDate": "2022-03-16T10:58:08.43",
        "returnRequestedBy": "abc@abc.com",
        "email": "abc@abc.com",
        "returnStatusLabel": "ReturnRequested",
        "returnStatus": 1,
        "reasonForReturn": "Automated RMA",
        "requiredAction": "Refund",
        "comment": "returning the items",
        "orderId": "07660706-b7a3-ec11-b1ba-000d3a211cf7",
        "orderNumber": "SO93186",
        "orderDate": "2022-03-14T16:51:42.71",
        "orderStatus": 5,
        "orderStatusLabel": "AcceptedInWarehouse",
        "lineItems": [
            {
                "recordId": "323ac73a-2787-4b90-8b8c-ae5a00b4c383",
                "productId": "EE7BC92E-E2E7-472D-8670-AD5E0048CA5D",
                "stockCode": "BS212729-WHTFLRL-14",
                "name": "White Floral Broderie Mini Dress with Tie Shoulder 14 Colour",
                "manufacturer": "My Brand",
                "subManufacturer": "",
                "orderQty": 1,
                "shippedQty": 0,
                "returnQtyRequested": 0,
                "returnQtyRecd": 0,
                "price": {
                    "currencySymbol": "£",
                    "formatted": {
                        "withTax": "£79.99",
                        "withoutTax": "£79.99",
                        "tax": "£0.00"
                    },
                    "raw": {
                        "withTax": 79.99,
                        "withoutTax": 79.99,
                        "tax": 0
                    }
                },
                "discountAmt": {
                    "currencySymbol": "£",
                    "formatted": {
                        "withTax": "£0.00",
                        "withoutTax": "£0.00",
                        "tax": "£0.00"
                    },
                    "raw": {
                        "withTax": 0,
                        "withoutTax": 0,
                        "tax": 0
                    }
                },
                "totalPrice": {
                    "currencySymbol": "£",
                    "formatted": {
                        "withTax": "£0.00",
                        "withoutTax": "£0.00",
                        "tax": "£0.00"
                    },
                    "raw": {
                        "withTax": 0,
                        "withoutTax": 0,
                        "tax": 0
                    }
                },
                "slug": "products/my-brand-white-floral-broderie-mini-dress-with-tie-shoulder-bs212729-whtflrl-12",
                "image": "https://liveocxcdn.azureedge.net/betterstore/fu_spring_0280.jpg?fm=webp",
                "status": 5,
                "statusCode": "AcceptedInWarehouse"