### Successful list response Source: https://api.epayco.co/ Example of a successful response containing a list of notes and pagination metadata. ```json { "success": true, "titleResponse": "Successful consult", "textResponse": "successful consult", "lastAction": "successful consult", "data": { "data": [ { "id": 72, "nota": "Texto de prueba tres", "bbl_comprador_id": 217, "created_at": "2024-03-29T17:55:23.000000Z", "updated_at": "2024-03-29T17:55:23.000000Z" } ], "current_page": 1, "from": 1, "last_page": 1, "next_page_url": "/buyers-notes/list?page=2", "path": "", "per_page": 10, "prev_page_url": null, "to": 1, "total": 1 } } ``` -------------------------------- ### List notes curl request Source: https://api.epayco.co/ Full curl request example for listing notes with version header and body. ```curl curl --location -g '{{apiServiceTestingBBL}}/buyers-notes/list' \ --header 'Version: 2' \ --data '{ "filter":{ "id":"", "buyer_id":217 }, "pagination": { "limit":10, "page":1, "path":"" } }' ``` -------------------------------- ### cURL Request to Apply Discount Code Source: https://api.epayco.co/ This cURL command demonstrates how to make a POST request to apply a discount code. It includes the necessary endpoint, headers, and the JSON data payload. ```curl curl --location -g '{{apiServiceTestingBBL}}/catalogue/apply-discount-codes' \ --header 'Version: 2' \ --data '{ "shopping_cart_id":"7c3c51711142598f3eaa", "discount_code":"desc23", "catalogue_id":1709936451475 }' ``` -------------------------------- ### POST /buyers-notes/create Source: https://api.epayco.co/ Creates a new note associated with a specific buyer. ```APIDOC ## POST /buyers-notes/create ### Description Creates a note for a client. ### Method POST ### Endpoint {{apiServiceTestingBBL}}/buyers-notes/create ### Parameters #### Request Body - **note** (string) - Required - The note content - **buyer_id** (integer) - Required - The ID of the buyer ### Request Example { "note": "Texto de prueba dos", "buyer_id": 217 } ### Response #### Success Response (200) - **success** (boolean) - Status of the operation - **titleResponse** (string) - Title of the response - **textResponse** (string) - Descriptive message - **data** (object) - Created note details #### Response Example { "success": true, "titleResponse": "Service Note Save", "textResponse": "Nota creada exitosamente", "lastAction": "Create Note", "data": { "nota": "Texto de prueba dos", "bbl_comprador_id": 217, "updated_at": "2024-03-29T17:51:59.000000Z", "created_at": "2024-03-29T17:51:59.000000Z", "id": 71 } } ``` -------------------------------- ### cURL Request to Create a Customer Note Source: https://api.epayco.co/ This cURL command shows how to send a POST request to create a customer note. It specifies the endpoint, the 'Version' header, and the JSON data containing the note and buyer ID. ```curl curl --location -g '{{apiServiceTestingBBL}}/buyers-notes/create' \ --header 'Version: 2' \ --data '{ "note":"Texto de prueba dos", "buyer_id":217 }' ``` -------------------------------- ### POST /buyers-notes/list - List Buyer Notes Source: https://api.epayco.co/ Retrieves a list of buyer notes. Supports optional filtering and pagination. ```APIDOC ## POST /buyers-notes/list ### Description Retrieves a list of buyer notes. Supports optional filtering and pagination. ### Method POST ### Endpoint /buyers-notes/list ### Parameters #### Query Parameters None #### Request Body - **filter** (JSON) - Required - Object containing search filters. - **id** (Integer) - Optional - The ID of the note. - **buyer_id** (Integer) - Required - The ID of the buyer. - **pagination** (JSON) - Required - Object containing pagination details. - **page** (integer) - Optional - The current page number. - **limit** (integer) - Optional - The maximum number of records to retrieve per page. ### Request Example ```json { "filter": { "id": "", "buyer_id": 217 }, "pagination": { "page": 1, "limit": 10 } } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **titleResponse** (string) - The title of the response. - **textResponse** (string) - The description of the response. - **lastAction** (string) - The last action performed. - **data** (object) - Contains the list of notes and pagination information. - **data** (array) - An array of note objects. - **id** (integer) - The ID of the note. - **nota** (string) - The content of the note. - **bbl_comprador_id** (integer) - The ID of the buyer associated with the note. - **created_at** (string) - The timestamp when the note was created. - **updated_at** (string) - The timestamp when the note was last updated. - **current_page** (integer) - The current page number. - **from** (integer) - The starting record number for the current page. - **last_page** (integer) - The total number of pages. - **next_page_url** (string) - URL for the next page of results, or null. - **path** (string) - The base URL path for pagination. - **per_page** (integer) - The number of records per page. - **prev_page_url** (string) - URL for the previous page of results, or null. - **to** (integer) - The ending record number for the current page. - **total** (integer) - The total number of records available. #### Response Example ```json { "success": true, "titleResponse": "Successful consult", "textResponse": "successful consult", "lastAction": "successful consult", "data": { "data": [ { "id": 72, "nota": "Texto de prueba tres", "bbl_comprador_id": 217, "created_at": "2024-03-29T17:55:23.000000Z", "updated_at": "2024-03-29T17:55:23.000000Z" } ], "current_page": 1, "from": 1, "last_page": 1, "next_page_url": "/buyers-notes/list?page=2", "path": "", "per_page": 10, "prev_page_url": null, "to": 1, "total": 1 } } ``` ``` -------------------------------- ### List buyer notes request Source: https://api.epayco.co/ Initial request structure for listing notes using a Bearer token. ```curl curl --location --request POST '/buyers-notes/list' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {jwt_token}' ``` -------------------------------- ### Failed Response for Applying Discount Code (Missing Parameters) Source: https://api.epayco.co/ This JSON structure indicates a failed attempt to apply a discount code due to missing or invalid parameters. It details the errors encountered, such as required fields not being provided or the discount code not existing. ```json { "success": false, "titleResponse": "Error", "textResponse": "Some fields are required, please correct the errors and try again", "lastAction": "validation data save", "data": { "totalErrors": 2, "errors": [ { "codError": 500, "errorMessage": "field id required" }, { "codError": 500, "errorMessage": "the discount code doesn't exist" } ] } } ``` -------------------------------- ### Request Body for Creating a Customer Note Source: https://api.epayco.co/ This JSON object represents the data required to create a customer note. It includes the 'note' content and the 'buyer_id' of the customer. Ensure these fields are present and correctly formatted. ```json { "note":"Texto de prueba dos", "buyer_id":217 } ``` -------------------------------- ### Request Body for Applying Discount Code Source: https://api.epayco.co/ This JSON object contains the necessary parameters to apply a discount code to a shopping cart. Ensure all fields like `shopping_cart_id`, `discount_code`, and `catalogue_id` are correctly populated. ```json { "shopping_cart_id":"7c3c51711142598f3eaa", "discount_code":"desc23", "catalogue_id":1709936451475 } ``` -------------------------------- ### Failed Response for Creating a Customer Note (Missing Parameters) Source: https://api.epayco.co/ This JSON response indicates a failure in creating a customer note, typically due to missing mandatory fields like 'note' or 'buyer_id'. The 'textResponse' field lists the specific validation errors. ```json { "success": false, "titleResponse": "error", "textResponse": [ "El campo nota es obligatorio.", "El campo Comprador id es obligatorio." ], "lastAction": "validation", "data": null } ``` -------------------------------- ### Successful Response for Creating a Customer Note Source: https://api.epayco.co/ This JSON response confirms the successful creation of a customer note. It includes details of the created note, such as its ID and timestamps. ```json { "success": true, "titleResponse": "Service Note Save", "textResponse": "Nota creada exitosamente", "lastAction": "Create Note", "data": { "nota": "Texto de prueba dos", "bbl_comprador_id": 217, "updated_at": "2024-03-29T17:51:59.000000Z", "created_at": "2024-03-29T17:51:59.000000Z", "id": 71 } } ``` -------------------------------- ### POST /catalogue/apply-discount-codes Source: https://api.epayco.co/ Applies a discount code to a specific shopping cart within a catalogue. ```APIDOC ## POST /catalogue/apply-discount-codes ### Description Applies a discount code to a shopping cart. ### Method POST ### Endpoint {{apiServiceTestingBBL}}/catalogue/apply-discount-codes ### Parameters #### Request Body - **shopping_cart_id** (string) - Required - ID of the shopping cart - **discount_code** (string) - Required - The discount code value - **catalogue_id** (integer) - Required - ID of the catalogue ### Request Example { "shopping_cart_id": "7c3c51711142598f3eaa", "discount_code": "desc23", "catalogue_id": 1709936451475 } ### Response #### Success Response (200) - **success** (boolean) - Status of the operation - **titleResponse** (string) - Title of the response - **textResponse** (string) - Descriptive message - **data** (boolean) - Result data #### Response Example { "success": true, "titleResponse": "Discount code state changed successfully", "textResponse": "successful consult", "lastAction": "successful consult", "data": true } ``` -------------------------------- ### Successful Response for Applying Discount Code Source: https://api.epayco.co/ This JSON structure represents a successful application of a discount code to a shopping cart. It confirms the operation and provides a success status. ```json { "success": true, "titleResponse": "Discount code state changed successfully", "textResponse": "successful consult", "lastAction": "successful consult", "data": true } ``` -------------------------------- ### Filter and pagination payload Source: https://api.epayco.co/ JSON body structure for filtering buyer notes by ID or buyer_id, including pagination settings. ```json { "filter": { "id": "", "buyer_id":217 }, "pagination": { "page": 1, "limit": 10 } } ``` ```json { "filter":{ "id":"", "buyer_id":217 }, "pagination": { "limit":10, "page":1, "path":"" } } ``` -------------------------------- ### POST /buyers-notes/delete - Delete Buyer Note Source: https://api.epayco.co/ Deletes a specific buyer note by its ID. ```APIDOC ## POST /buyers-notes/delete ### Description Deletes a specific buyer note by its ID. ### Method POST ### Endpoint /buyers-notes/delete ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **id** (Integer) - Required - The ID of the note to be deleted. ### Request Example ```json { "id": 71 } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **titleResponse** (string) - The title of the response. - **textResponse** (string) - The description of the response. - **lastAction** (string) - The last action performed. - **data** (integer) - Typically 1, indicating successful deletion. #### Response Example ```json { "success": true, "titleResponse": "Service Note Delete", "textResponse": "Nota eliminada exitosamente", "lastAction": "Delete Note", "data": 1 } ``` #### Error Response (e.g., 400 Bad Request) - **success** (boolean) - Indicates if the request was successful. - **titleResponse** (string) - The title of the error response. - **textResponse** (array) - An array of error messages. - **lastAction** (string) - The action that caused the error. - **data** (null) - Null value when an error occurs. #### Error Response Example ```json { "success": false, "titleResponse": "error", "textResponse": [ "El id de la nota es obligatorio." ], "lastAction": "validation", "data": null } ``` ``` -------------------------------- ### Delete note responses Source: https://api.epayco.co/ JSON responses for successful note deletion and validation error scenarios. ```json { "success": true, "titleResponse": "Service Note Delete", "textResponse": "Nota eliminada exitosamente", "lastAction": "Delete Note", "data": 1 } ``` ```json { "success": false, "titleResponse": "error", "textResponse": [ "El id de la nota es obligatorio." ], "lastAction": "validation", "data": null } ``` -------------------------------- ### Delete note request Source: https://api.epayco.co/ JSON payload and curl command for deleting a note by ID. ```json { "id":71 } ``` ```curl curl --location -g '{{apiServiceTestingBBL}}/buyers-notes/delete' \ --header 'Version: 2' \ --data '{ "id":71 }' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.