Reference APIs

This section gives an overview on Marketing Catalog reference data types and describes the associated APIs.

The following types of Reference Data are available in Marketing Catalog microservices:

  • User-defined Reference - User-defined codes are customer-specific codes that need to be configured and validated in the microservices.
  • MS Specific Reference - Reference data specific to a particular microservice.

User-defined Reference

In case of user-defined code type, you can make use of custom data for the attributes marked with reference data support (x-referencetype) in the API documentation. To create, update or delete the user defined references, see the APIs section.

MS Specific Reference

Reference data which are specific to marketing catalog microservice is handled by the marketing catalog APIs.

Below is the list of reference data supported in Marketing Catalog Microservice:

APIs

This section shows the reference APIs.

CREATE REFERENCE DATA
This API is used to create reference data with given details.

POST/reference

Sample URL
http://localhost:8002/ms-marketingcatalog-api/api/v1.0.0/reference
Request
{
  "references": {
    "ContactPointType": [
      {
        "value": "email",
        "description": "Electronic Address"
      },
      {
        "value": "phone",
        "description": "Phone Address"
      },
      {
        "value": "address",
        "description": "Physical Address"
      }
    ],
    "PhysicalAddressType": [
      {
        "value": "home",
        "description": "Home"
      },
      {
        "value": "residencial",
        "description": "Residencial"
      },
      {
        "value": "office",
        "description": "Office"
      }
    ]
  }
}
Response
{
  "status": 200,
  "message": "Operation successful"
}
GET THE LIST OF DYNAMIC REFERENCE DATA
This API is used to retrieve the list of dynamic reference data for given reference data type.

GET/reference

Sample URL
http://localhost:8002/ms-marketingcatalog-api/api/v1.0.0/reference
Response
{
  "references": {
    "LegalIdentifierType": [
      {
        "value": "passport",
        "description": "Passport"
      },
      {
        "value": "driverslicense",
        "description": "Driver's license"
      }
    ]
  },
  "status": 200,
  "message": "Operation successful"
}
UPDATE REFERENCE DATA
This API is used to update reference data's description of the given reference details.

PUT/reference

Sample URL
http://localhost:8002/ms-marketingcatalog-api/api/v1.0.0/reference
Request
{
  "references": {
    "ContactPointType": [
      {
        "value": "email",
        "description": "Electronic Address"
      },
      {
        "value": "phone",
        "description": "Phone Address"
      },
      {
        "value": "address",
        "description": "Physical Address"
      }
    ],
    "PhysicalAddressType": [
      {
        "value": "home",
        "description": "Home"
      },
      {
        "value": "residencial",
        "description": "Residencial"
      },
      {
        "value": "office",
        "description": "Office"
      }
    ]
  }
}
Response
{
  "status": 200,
  "message": "Operation successful"
}
ADD COLLECTION ITEM
This API is used to add an existing collection item with the new values.

POST/reference/{types}

Sample URL
http://localhost:8002/ms-marketingcatalog-api/api/v1.0.0/reference/{types}
Request
{
  "value": "GuardianAddress",
  "description": "Guardian's Address"
}
Response
{
  "status": 200,
  "message": "Operation successful"
}
DELETE REFERENCE DATA
This API is used to delete the reference data for a given reference data type and value.

DELETE/reference/{types}

Sample URL
http://localhost:8002/ms-marketingcatalog-api/api/v1.0.0/reference/{types}
Response
{
  "status": 200,
  "message": "Delete successful"
}			

Copyright © 2020- Temenos Headquarters SA

Published on :
Tuesday, October 5, 2021 11:08:19 AM IST

Feedback
x