Get P and Ls API

This API is used to get all the P and L's that are created using the UI or API in the tenant.

📘

Know your endpoint

Based on the domain you use to log in to Webex Campaign, the endpoint domain for your API varies. For more information, refer to the Know Your API Endpoints section.

Headers

The following table describes the request headers:

Request HeaderDescription
content-typeapplication/json
authorizationAccess token or API Secret Key in Bearer format

Example: Bearer $(key)

Request Example



https://yourapihubdomain.io/v1/pandls
https://yourapihubdomain.io/v1/pandls/582

Response Parameters

This API will return the following response parameters:

ParameterDescription
tenantNameReturns the tenant name in which the P and L is created.
nameReturns the name of the P and L.
idReturns the id of the P and L.
imageUrlReturns the Image URL path of the P and L logo.
createdDateReturns the P and L created date.
descriptionReturns the description of the P and L.

Response Example

[
    {
        "id": 582,
        "name": "Marketing",
        "tenantName": "surya",
        "createdDate": "2023-01-05 08:51:06",
        "description": "Marketing P and L",
        "imageUrl": "http://demo.qa.webexcampaign.io/assets/logos/Untitled.png"
    },
    {
        "id": 581,
        "name": "Sales",
        "tenantName": "surya",
        "createdDate": "2022-11-22 07:14:56",
        "description": "Sales P and L",
        "imageUrl": "http://demo.qa.webexcampaign.io/assets/logos/thumbnail.png"
    },
    {
        "id": 579,
        "name": "Presales",
        "tenantName": "surya",
        "createdDate": "2022-11-20 07:15:21",
        "description": "Presales P and L",
        "imageUrl": "http://demo.qa.webexcampaign.io/assets/logos/thumbnail.png"
    }
  ]

Failure Response Codes

The API will return code within the response as per the following table in case of failure scenarios.

HTTP Status CodeCode within API ResponseDescription
400400I/O error on post request. Cannot retry due to server authentication, in streaming mode.
401430Authorization failed. This resource is not allowed to access using this TOKEN or KEY
401498Invalid token or Access token expired
404404Not found
405405Method not supported
500500Internal server error
Language