Level 3 Profiles API

Introduction

Before you dive into this section, we recommend that you first review the documentation on the Level 3 Profile with regards to our PayConex™ v3.8 API. That will give you some foundational understanding of Level 3 Profiles and their significance in the context of commercial and business card transactions: Using Level 3 Processing Profiles.

🚧

Note

The ***** wild cards isn't added in the real responses. It is redacted for the examples below.

Creating a Level 3 Profile

POST /api/v4/accounts/{accountId}/level3-profile

{
  "name": "TESTPROFILE1",
  "data": {
    "summaryCommodityCode": "8012",
    "shipFromZip": "12345",
    "lineItemDetail": [
      {
        "commodityCode": "801215000",
        "description": "Legal Services",
        "productCode": "ABC123",
        "quantity": "112.4595",
        "unitOfMeasure": "40.0000",
        "unitCost": "250.00"
      }
    ]
  }
}

🚧

Note

Setting setAsDefault to true in the body of the request means that any transaction involving a commercial or business card is updated with the profile’s Level 3 details. In response, we receive the newly created Level 3 Profile data.

* The name of a level profile must be unique.

*Required Scopes: pcx:level3_profiles:*, pcx:level3_profiles:create

Here, we specify the required fields for the creation of a Level 3 Profile. See API Reference for all the optional fields.

Editing Level 3 Profile

📘

Note

  • {accountId} value in the path is the PayConex™ account ID number.
  • {resourceId} value in the path is the id of a Level 3 Profile to edit or update.

We can easily update the Level 3 Profile including name and the rest of the data fields.

PATCH /api/v4/accounts/{accountId}/level3-profile/{resourceId}

{
  "name": "TESTPROFILE2",
  "data": {
    "summaryCommodityCode": "8013",
    "shipFromZip": "12346",
    "lineItemDetail": [
      {
        "commodityCode": "801215000",
        "description": "Legal Services",
        "productCode": "ABC123",
        "quantity": "112.4595",
        "unitOfMeasure": "40.0000",
        "unitCost": "250.00"
      }
    ]
  }
}

*Required Scopes: pcx:level3_profiles:*, pcx:level3_profiles:update

Getting a Level 3 Profile

Along with the Level 3 Profile data, we also get the item data that was saved with the rest of the Level 3 profile. This data includes commodityCode, description and productCode. See Transaction Items.

📘

Note

  • {accountId} value in the path is the PayConex™ account ID number.
  • {resourceId} value in the path is the ID of a Level 3 Profile to get.

GET /api/v4/accounts/{accountId}/level3-profile/{resourceId}

*Required Scopes: pcx:level3_profiles:*, pcx:level3_profiles:read

Response

{
  "id": "lvl3p_*****257b13a439585f8b32512d33929",
  "name": "TESTPROFILE",
  "setAsDefault": false,
  "enabled": true,
  "data": {
    "summaryCommodityCode": "8012",
    "shipFromZip": "12345",
    "lineItemDetail": [
      {
        "commodityCode": "801215000",
        "description": "Legal Services",
        "productCode": "12345",
        "quantity": "40.0000",
        "unitOfMeasure": "HUR",
        "unitCost": "250.00"
      }
    ],
    "transactionSaleTaxRate": "0800"
  }
}

Getting Level 3 Profiles

Query Parameters

ParameterTypeDescriptionExample
pageintegerThe page number for the limit.Default: 1
limitintegerThe number of items to return in responseDefault: 100
querystringA query parameter that filters the dataset.TESTPROFILE
directionstringSort by certain direction. Check out orderBy.
Available values : asc, ASC, desc, DESC
ASC
orderBystringThe name of the property where to apply the order commandname

To retrieve the list of all the active Level 3 profiles, you can make a request to the following endpoint. The most useful property in the response is the id, which can be used to fetch the complete metadata of a specific Level 3 profile.

📘

Note

  • {accountId} value in the path is the PayConex™ account ID number.

GET /api/v4/accounts/{accountId}/level3-profile

*Required Scopes: pcx:level3_profiles:*, pcx:level3_profiles:read

Response

[
  {
    "id": "lvl3p_*****257b13a439585f8b32512d33929",
    "name": "TESTPROFILE",
    "setAsDefault": false,
    "enabled": true,
    "created_date": "2024-06-28T11:57:10.000000Z",
    "updated_date": "2024-06-28T11:57:10.000000Z"
  },
  {
    "id": "lvl3p_*****4f48f4241dd9113e8e8622f79e3",
    "name": "TESTPROFILE6",
    "setAsDefault": false,
    "enabled": true,
    "created_date": "2024-10-31T13:25:54.000000Z",
    "updated_date": "2024-10-31T13:25:54.000000Z"
  }
]