MiPaymentChoice API: Customers

From MiPaymentChoice Gateway
Jump to navigation Jump to search

General

Customer API's

Note: All endpoints should use this prefix: https://gateway.mipaymentchoice.com/api/

Routes

Route Description
GET /customers/{customerKey} Get customer details.
GET /customers Get a list of all customers for a specified merchant.
PATCH /customers/{customerKey} Updates one or more properties of a customer.
PUT /customers/{customerKey} Replaces a customer record with an updated version.
DELETE /customers/{customerKeys} Deletes one or more customers that match the comma-separated list of keys.
POST /customers Create a new active-status customer for a merchant.

Request Headers

Header Value
Authentication Bearer [authentication (JWT) token]
Content-Type application/json

Request Body

{
  "CustomerName": "string",
  "CustomerId": "string",
  "MerchantKey": 0,
  "DefaultContact": {
    "LastName": "string",
    "FirstName": "string",
    "JobTitle": "string",
    "DepartmentName": "string",
    "EmailAddress": "string",
    "DaytimeTelephoneNumber": "string",
    "NighttimeTelephoneNumber": "string",
    "FaxNumber": "string",
    "MobileTelephoneNumber": "string"
  },
  "ShippingAddress": {
    "StreetAddress1": "string",
    "StreetAddress2": "string",
    "StreetAddress3": "string",
    "City": "string",
    "StateOrProvinceCode": "AK",
    "PostalCode": "string",
    "CountryCode": "USA"
  },
  "BillingAddress": {
    "StreetAddress1": "string",
    "StreetAddress2": "string",
    "StreetAddress3": "string",
    "City": "string",
    "StateOrProvinceCode": "AK",
    "PostalCode": "string",
    "CountryCode": "USA"
  },
  "ActivationStatus": "Pending"
}

Parameter Details

Property Required Data Additional Information
CustomerName Yes String The name of the customer.
CustomerId String A merchant assigned identifier for the customer.
MerchantKey Yes Numeric The key of the owning merchant.
DefaultContact Object Data for the default contact record for the customer.
ShippingAddress Object Data for the shipping address for the customer.
BillingAddress Object Data for the billing address record for the customer.
ActivationStatus Enumeration Defaults to 'Active'. 'Pending', 'Active', 'Inactive', 'Deleted'.

Response Body

{
  "CustomerKey": 0,
  "CustomerID": "string",
  "CustomerName": "string",
  "CreationTimestamp": "2019-02-23T20:00:39.692Z",
  "LastUpdateTimestamp": "2019-02-23T20:00:39.692Z",
  "ActivationStatus": "string",
  "MerchantKey": 0,
  "SelfLink": "string",
  "DefaultContactLink": "string",
  "BillingAddressLink": "string",
  "ShippingAddressLink": "string",
  "PaymentTokensLink": "string"
}