GET
/
v2.01
/
{ClientId}
/
responses
/
{IdempotencyKey}
const mangopayInstance = require("mangopay2-nodejs-sdk");
const mangopay = new mangopayInstance({
  clientId: "client-id",
  clientApiKey: "api-key",
});

let idempotencyKey = "045896dd-2547-4f91-a352-5303bb2c258c";

const viewApiResponse = async (idempotencyKey) => {
  return await mangopay.Idempotency.get(idempotencyKey)
    .then((response) => {
      console.info(response);
      return response;
    })
    .catch((err) => {
      console.log(err);
      return false;
    });
};

viewApiResponse(idempotencyKey);
{
    "StatusCode": "200",
    "ContentLength": "591",
    "ContentType": "application/json; charset=utf-8",
    "Date": "Tue, 19 Jul 2022 08:47:59 GMT",
    "RequestURL": "https://api.mangopay.com/V2.01/clientId/users/natural",
    "Resource": {
        "Address": {
            "AddressLine1": "Rue des plantes",
            "AddressLine2": "The Oasis",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        },
        "FirstName": "Jane",
        "LastName": "Doe",
        "Birthday": null,
        "Nationality": null,
        "CountryOfResidence": null,
        "Occupation": null,
        "IncomeRange": null,
        "ProofOfIdentity": null,
        "ProofOfAddress": null,
        "Capacity": "NORMAL",
        "Id": "146476890",
        "Tag": "test doc july 2022",
        "CreationDate": 1658220479,
        "PersonType": "NATURAL",
        "Email": "jdoe@mail.com",
        "KYCLevel": "LIGHT",
        "TermsAndConditionsAccepted": true,
        "TermsAndConditionsAcceptedDate": 1658220479,
        "UserCategory": "PAYER"
    }
}  
This call returns an API response based on the corresponding idempotency key, within 24 hours of the initial call.

Path parameters

IdempotencyKey
string
required
Min. length: 16 characters; max. length: 36 characters; only alphanumeric and dashesA unique string generated by the platform.

Responses

{
    "StatusCode": "200",
    "ContentLength": "591",
    "ContentType": "application/json; charset=utf-8",
    "Date": "Tue, 19 Jul 2022 08:47:59 GMT",
    "RequestURL": "https://api.mangopay.com/V2.01/clientId/users/natural",
    "Resource": {
        "Address": {
            "AddressLine1": "Rue des plantes",
            "AddressLine2": "The Oasis",
            "City": "Paris",
            "Region": "Ile de France",
            "PostalCode": "75001",
            "Country": "FR"
        },
        "FirstName": "Jane",
        "LastName": "Doe",
        "Birthday": null,
        "Nationality": null,
        "CountryOfResidence": null,
        "Occupation": null,
        "IncomeRange": null,
        "ProofOfIdentity": null,
        "ProofOfAddress": null,
        "Capacity": "NORMAL",
        "Id": "146476890",
        "Tag": "test doc july 2022",
        "CreationDate": 1658220479,
        "PersonType": "NATURAL",
        "Email": "jdoe@mail.com",
        "KYCLevel": "LIGHT",
        "TermsAndConditionsAccepted": true,
        "TermsAndConditionsAcceptedDate": 1658220479,
        "UserCategory": "PAYER"
    }
}  
const mangopayInstance = require("mangopay2-nodejs-sdk");
const mangopay = new mangopayInstance({
  clientId: "client-id",
  clientApiKey: "api-key",
});

let idempotencyKey = "045896dd-2547-4f91-a352-5303bb2c258c";

const viewApiResponse = async (idempotencyKey) => {
  return await mangopay.Idempotency.get(idempotencyKey)
    .then((response) => {
      console.info(response);
      return response;
    })
    .catch((err) => {
      console.log(err);
      return false;
    });
};

viewApiResponse(idempotencyKey);