List 

GET /v2/b2b/customers

List all customers matching the search criteria. The search looks for matching names or emails. When the search criteria is null, it returns all the customers.

Input

  • search:  Optional. The string(s) you are looking for. 
  • page: Optional. The page that you want returned, default is 1.
  • pageSize: Optional. The number of items you want returned in a  page.  Default is 100. Setting this to -1 will return everything.
  • sortField: Optional. The filed that you want to sort by 
  • updatedAfter: Optional, ISO8601 date string, Only returns customers that were updated after the specified date.
  • ignoreMyUpdates: Optional, boolean, defaults to false. When set to true, ignores the customers that were last updated by the current user.
  • includeAddress: Optional, boolean, defaults to false. When set to true, include customer address in the response.
  • includeAttrs: Optional, boolean, default to false. When set to true, include customer attrs if available. 

Returns

a paginated list of Customer objects. A sample paginated list response is attached below.


Sample Request:

https://sand4-api.acmeticketing.com/v2/b2b/customers?updatedAfter=2016-04-31T00:00:00Z&ignoreMyUpdates=false

HEADERS:

x-acme-session: XXXX
x-acme-api-version: 1
Content-Type: application/json


Advanced Search

 GET /v2/b2b/customers/advancedsearch

List all customers matching the search criteria. The search looks for matching names or emails. When the search criteria is null, it returns all the customers.

Input

  • page: Optional. The page that you want returned, default is 1.
  • pageSize: Optional. The number of items you want returned in a  page.  Default is 100. Setting this to -1 will return everything.
  • sortField: Optional. The filed that you want to sort by 
  • sortDirection: Optional. 
  • firstName: Optional
  • lastName: Optional
  • email: Optional
  • phone: Optional
  • address: Optional
  • zip: Optional

Returns

a paginated list of Customer objects. A sample paginated list response is attached below.


Note: Doesn't include customer Attributes

Sample Request:

https://sand4-api.acmeticketing.com/v2/b2b/customers/advancedsearch?pageSize=50&page=1&sortField=createdOn&sortDirection=desc&firstName=Daario

Sample Response: 

{
  "success"true,
  "payload": {
    "list": [
      {
        "id"135434,
        "customerSource""acme",
        "customerId""A257534987",
        "externalCustomerImportId""ACMEA257534987",
        "externalCustomerId""A257534987",
        "firstName""Daario",
        "lastName""Naaharis",
        "prefix""",
        "suffix""",
        "orgName""The Second Sons",
        "deceased"false,
        "solicitationCodes": [],
        "address": [
          {
            "id"120909,
            "streetAddress1""123 Dusty Road",
            "city""Yunkhai",
            "state""AA",
            "zipCode""55555",
            "country""United States",
            "type""primary",
            "isPrimary"false,
            "version"0
          }
        ],
        "attributes": [],
        "version"0
      },
      {
        "id"135445,
        "customerSource""acme",
        "customerId""A224506446",
        "externalCustomerImportId""ACMEA224506446",
        "externalCustomerId""A224506446",
        "firstName""Daario",
        "lastName""Naaharis",
        "prefix""",
        "suffix""",
        "orgName""The Second Sons",
        "deceased"false,
        "solicitationCodes": [],
        "address": [
          {
            "id"120951,
            "streetAddress1""123 Dusty Road",
            "city""Yunkhai",
            "state""AA",
            "zipCode""55555",
            "country""United States",
            "type""primary",
            "isPrimary"false,
            "version"0
          }
        ],
        "attributes": [],
        "version"0
      },
      {
        "id"135475,
        "customerSource""acme",
        "customerId""A226060956",
        "externalCustomerImportId""ACMEA226060956",
        "externalCustomerId""A226060956",
        "firstName""Daario",
        "lastName""Naaharis",
        "prefix""",
        "suffix""",
        "orgName""The Second Sons",
        "deceased"false,
        "solicitationCodes": [],
        "address": [
          {
            "id"120989,
            "streetAddress1""123 Dusty Road",
            "city""Yunkhai",
            "state""AA",
            "zipCode""55555",
            "country""United States",
            "type""primary",
            "isPrimary"false,
            "version"0
          }
        ],
        "attributes": [],
        "version"0
      },
      {
        "id"135484,
        "customerSource""RE",
        "customerId""72251",
        "externalCustomerImportId""00001-593-0000055940",
        "externalCustomerId""72251",
        "firstName""Daario",
        "lastName""Naaharis",
        "deceased"false,
        "solicitationCodes": [],
        "address": [
          {
            "id"121006,
            "streetAddress1""123 Dusty Road",
            "city""Yunkhai",
            "state""AA",
            "zipCode""55555",
            "country""United States",
            "suburb""",
            "type""primary",
            "isPrimary"false,
            "version"0
          }
        ],
        "attributes": [],
        "version"0,
        "memberships": [
          {
            "membershipMethod"null,
            "id"15686,
            "importId""00001-567-0000016324",
            "program""Corporate",
            "category""Corporate Partner",
            "membershipTypeId"232,
            "externalMembershipId""1000058023",
            "membershipJoinedDate""2016-09-25T22:00:00-06:00",
            "membershipStartDate""2016-09-25T22:00:00-06:00",
            "membershipExpirationDate""2017-09-29T22:00:00-06:00",
            "membershipStanding""active",
            "cardholders": [
              {
                "id"112128,
                "membershipId"15686,
                "cardImportId""00001-570-0000030032",
                "cardType""secondary",
                "name""(72251) Daario Naaharis",
                "barcode""1000058023",
                "acmeBarcode""1000058023",
                "deceased""no",
                "primaryCard""no",
                "solicitationCodes""",
                "startDate""2016-09-25T22:00:00-06:00",
                "expirationDate""2017-09-29T22:00:00-06:00",
                "cardStatus""active",
                "printCount"0,
                "printStatus""notPrinted"
              }
            ],
            "organizationId"1602,
            "orgImportId""00001-593-0000055939",
            "acmeMembershipNumber""1000058023",
            "isGift"false
          }
        ]
      }
    ],
    "pagination": {
      "page"1,
      "pageSize"50,
      "sortDirection""desc",
      "sortField""createdOn",
      "count"4
    }
  }
}


Get 

GET /v2/b2b/customers/external/{importId}

Get a customer. Tenant specific.

Input

  • importId, Path variable. String, the customer import Id.
  • includeAssociatedMemberships. optional. boolean. When set to true, includes all associated memberships for this customer.

Returns

The customer object.


Note: Doesn't include customer Attributes


Get 

GET /v2/b2b/customers/{id}

Get a customer. Tenant specific.

Input

  • id, Path variable. String, the customer Id.
  • includeAssociateMembership. optional. boolean. When set to true, include all associated memberships for the customer
  • includeAttributes. optional. boolean. When set to true, includes the attributes if available with the result.


Returns

The customer object.


Customer Object

FieldType
Description
Notes
id
LongAuto-increment ID. Used as the seed for the customerId. Generated by the database.
customerSource
String(SourceEnum)when generated in RE, this should contain "RE". For Salesforce, SF. When generated in Acme, it will contain "Acme".
"RE"
"acme"
"SF"
"other"

customerId
StringAcme customer ID. Should only be generated by Acme, will never be modified. Tenant specific Prefix + A unique 10 digit random number.
externalCustomerId
StringThe External customer ID. This is the ID of the customer in an external system.
 externalCustomerImportId StringRequired. Generated by Acme/ExternalSystem. When generated by acme, this field will contain "ACME" + customerId. When Generated by an external system, this should be a unique ID for the customer.
firstName
 String

lastName
 String

middleNameString

email
 String

phoneNumber
 String

phoneNotes
String

prefix
String

suffix
String

orgName
Stringthe organization name of the customer.
deceased
boolean

solicitationCodes
List<String>Used by RE. For customer communication preferences. Eg. Do not call after 5.00 PM.
address
List<Address>A list of addresses for the customer.
address[x].streetAddress1
String

address[x].streetAddress2
String

address[x].city
String

address[x].state
String

address[x].zipCode
String

address[x].country
String

address[x].suburb
StringUsed by RE.

address[x].type
String(AddressTypeEnum)Should either contain "primary" or "billing"
address[x].isPrimary
booleanUsed incase of multiple primary aka shipping addresses / billing addresses. We are not using this right now. Will default to false.
attributes
List<CustomerAttribute>Used by RE. The special attributes of this customer. Vip, reciprocal etc.
attributes[x].category
String

attributes[x].description
String

attributes[x].notes
String

attributes[x].date
StringShould be in ISO8601 format
errors
Used by RE. List of errors that happened when we were trying to sync.

READ ONLY, Returned as part of bulk update and bulk create response.

errors[x].error

String of the error that happened.
 errors[x].membershipImportId
The id of the membership that had an error.
 
errors[x].cardImportId

The import id of the card holder that had an error, in cases of partial success.
 errors[x].customerImportId
The id of the customer that had an error.
errors[x].benefitImportId

The import id of the benefit that had an error, in cases of partial success.