Skip to main content

Add Integration Request

Add integration request to the company.

Request​

POST:/{integrationId}/integration

Request Parameters​

ParameterDescriptionType
accountBookIdThe accountBookId of the company.numberrequired

Request Body​

Integration Input Model
FieldDescriptionTypeRemark
appAccountIdIntegration app's account id.guidrequiredIt is an id that uniquely identify your integration app’s account. It has to be guid in order to prevent conflict with other integration.
appAccountNameIntegration app account name. It is used for display purpose.stringrequired
appCountryIntegration app country.stringrequiredThis indicates the currency in which the integration app uses. It is used to ensure the integration app's currency is the same with the currency used by the company in OneRewards.

The supported country are:
  • Malaysia
Example of Request Body
{
"appAccountId": "194218d5-6a25-4f64-9248-246b9c63dd25",
"appAccountName": "Acme Web Store",
"appCountry": "Malaysia"
}

Example of Request URL:

Parameters:
accountBookId = 1

URL:
POST: https://onerewards-integration-api.autocountcloud.com/integration?accountBookId=1

Response​

Success Response​

Status Code: 200

Response Body​

Integration Result Model
FieldDescriptionType
integrationIdGlobally unique identifier for integration.guidnullable
isApprovedIntegration request status. true indicate the request is approved.boolean
isPendingIntegration request status. true indicate the request is pending.boolean
isRejectedIntegration request status. true indicate the request is rejected.boolean
Example of Success Response Body
{
"integrationId": null,
"isApproved": false,
"isPending": true,
"isRejected": false
}

Error Response​