M2X APIs
M2X APIS (1.0.0)
Download OpenAPI description
Overview
License
All Rights Reserved
Languages
Servers
Mock server
https://developer.m2x.app/_mock/apis/publicapi/openapi/
https://developer.m2x.app/apis/v0/
NZ Production server (uses live data)
https://m2x.app/apis/v0/
US Production server (uses live data)
https://us.m2x.app/apis/v0/
AUS Production server (uses live data)
https://au.m2x.app/apis/v0/
Sandbox server
https://staging.m2x.app/apis/v0/
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/customers
- https://developer.m2x.app/apis/v0/customers
- NZ Production server (uses live data)https://m2x.app/apis/v0/customers
- US Production server (uses live data)https://us.m2x.app/apis/v0/customers
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/customers
- Sandbox serverhttps://staging.m2x.app/apis/v0/customers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://developer.m2x.app/_mock/apis/publicapi/openapi/customers \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
[ { "id": "customer123", "name": "My customer", "externalId": "C123", "integrationId": "123-123-123", "postalAddress": "40 test street", "email": "email@test.com", "contactFirstName": "Joe", "contactLastName": "Blog", "businessPhone": "000 000 00", "businessMobilePhone": "000 000 00", "disabled": true, "onHold": true } ]
Bodyapplication/json
Address used to differentiate similar customers in the front end
Example: "40 test street"
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/customers
- https://developer.m2x.app/apis/v0/customers
- NZ Production server (uses live data)https://m2x.app/apis/v0/customers
- US Production server (uses live data)https://us.m2x.app/apis/v0/customers
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/customers
- Sandbox serverhttps://staging.m2x.app/apis/v0/customers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.m2x.app/_mock/apis/publicapi/openapi/customers \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "My customer",
"externalId": "C123",
"integrationId": "123-123-123",
"postalAddress": "40 test street",
"email": "email@test.com",
"contactFirstName": "Joe",
"contactLastName": "Blog",
"businessPhone": "000 000 00",
"businessMobilePhone": "000 000 00",
"disabled": true,
"onHold": true
}'Response
application/json
{ "id": "customer123", "name": "My customer", "externalId": "C123", "integrationId": "123-123-123", "postalAddress": "40 test street", "email": "email@test.com", "contactFirstName": "Joe", "contactLastName": "Blog", "businessPhone": "000 000 00", "businessMobilePhone": "000 000 00", "disabled": true, "onHold": true }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/customers/{customerId}
- https://developer.m2x.app/apis/v0/customers/{customerId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/customers/{customerId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/customers/{customerId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/customers/{customerId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/customers/{customerId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/customers/{customerId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
{ "id": "customer123", "name": "My customer", "externalId": "C123", "integrationId": "123-123-123", "postalAddress": "40 test street", "email": "email@test.com", "contactFirstName": "Joe", "contactLastName": "Blog", "businessPhone": "000 000 00", "businessMobilePhone": "000 000 00", "disabled": true, "onHold": true }
Bodyapplication/json
Address used to differentiate similar customers in the front end
Example: "40 test street"
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/customers/{customerId}
- https://developer.m2x.app/apis/v0/customers/{customerId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/customers/{customerId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/customers/{customerId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/customers/{customerId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/customers/{customerId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/customers/{customerId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "My customer",
"externalId": "C123",
"integrationId": "123-123-123",
"postalAddress": "40 test street",
"email": "email@test.com",
"contactFirstName": "Joe",
"contactLastName": "Blog",
"businessPhone": "000 000 00",
"businessMobilePhone": "000 000 00",
"disabled": true,
"onHold": true
}'Response
application/json
{ "id": "customer123", "name": "My customer", "externalId": "C123", "integrationId": "123-123-123", "postalAddress": "40 test street", "email": "email@test.com", "contactFirstName": "Joe", "contactLastName": "Blog", "businessPhone": "000 000 00", "businessMobilePhone": "000 000 00", "disabled": true, "onHold": true }
Bodyapplication/jsonArray [ ]
Address used to differentiate similar customers in the front end
Example: "40 test street"
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/customers/bulk
- https://developer.m2x.app/apis/v0/customers/bulk
- NZ Production server (uses live data)https://m2x.app/apis/v0/customers/bulk
- US Production server (uses live data)https://us.m2x.app/apis/v0/customers/bulk
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/customers/bulk
- Sandbox serverhttps://staging.m2x.app/apis/v0/customers/bulk
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.m2x.app/_mock/apis/publicapi/openapi/customers/bulk \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '[
{
"id": "string",
"customer": {
"name": "My customer",
"externalId": "C123",
"integrationId": "123-123-123",
"postalAddress": "40 test street",
"email": "email@test.com",
"contactFirstName": "Joe",
"contactLastName": "Blog",
"businessPhone": "000 000 00",
"businessMobilePhone": "000 000 00",
"disabled": true,
"onHold": true
}
}
]'Response
application/json
{ "success": true, "batchId": "ABC123" }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/customers/search
- https://developer.m2x.app/apis/v0/customers/search
- NZ Production server (uses live data)https://m2x.app/apis/v0/customers/search
- US Production server (uses live data)https://us.m2x.app/apis/v0/customers/search
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/customers/search
- Sandbox serverhttps://staging.m2x.app/apis/v0/customers/search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.m2x.app/_mock/apis/publicapi/openapi/customers/search \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"search": null,
"includeDisabled": false,
"externalId": null,
"name": null,
"pageFrom": 0,
"pageSize": 20
}'Response
application/json
{ "from": 0, "size": 0, "total": 0, "hits": [ { … } ] }