CPL API
Useful links
  • Developer
  • Sandbox
Useful links
  • Developer
  • Sandbox
Přepni do češtiny
    • Introduction
    • General
    • Creation of orders and shipments
    • Changelog
    • Authentication
      • Getting Bearer token
    • API Methods
    • Examples
      • Response - pick up labels (PDF A4)
      • Response - pickup label (ZPL)
      • Response - pick up label (JPG)
      • Shipment - shipment set items
      • International Shipment with or without COD – Parcels in a Set
      • Multiple shipments in one request
    • FAQ
    • Postman Collection

    Postman Collection

    Using the Postman tool, you can explore the CPL REST API. You can modify requests and view responses for any of them.
    You can test the API immediately by forking the Postman collection. If you want to test your own application, simply enter the client_id and client_secret that were assigned to you for your test account.

    1. Fork the PayPal Collection in Postman#

    1.
    Sign up or log in at https://www.postman.com/
    2.
    In the documentation, click the Run in Postman button.
    Run In Postman
    3.
    Select Fork Collection.
    4.
    Name your fork and choose the workspace where it should be saved.

    2. Application Authorization#

    Insert the client_id and client_secret assigned to your test account into Postman:
    1.
    Open your fork of the CPL API collection in Postman.
    2.
    In the collection, go to the Variables tab and enter your client_id and client_secret under the CURRENT VALUE column.
    3.
    Click Save.
    Postman contains a script that automatically generates and manages the authToken. Using this token, you can call any API within the collection on behalf of your application. The token call is included in each request.

    3. Calling the API in Postman#

    You always need to insert query parameters or a request body according to your requirements. For example, you can use the order endpoint to create an order and capture a payment using sandbox accounts.

    How to create an order:#

    1.
    In Postman, navigate to your fork of the CPL API collection.
    2.
    Select: Order > POST /order > fill in the request body according to your needs > Send.
    If the request is successful, you will receive response code 201 (Order Created).
    3.
    Then you can call any follow-up methods.
    This way, you can easily test the functionality of the CPL REST API before deploying it to the production environment.
    Previous
    FAQ
    Built with