{"info":{"_postman_id":"34b02f9b-7d13-4309-bdb6-a5250f3ada78","name":"B2B API Integration","description":"<html><head></head><body><p><strong>Connection requirements.</strong><br><strong>TOKEN:</strong> To connect to these endpoints it is necessary to have a token in the headers. This token is obtained by login with the credentials assigned to the development team, the token must be added to the Authorization header as follows:<br><strong>Authorization: Bearer {TOKEN}</strong><br><strong>VPN:</strong> Optionally we recommend using a VPN to make the connection between B2B Enterprise and external entities.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"1438381","collectionId":"34b02f9b-7d13-4309-bdb6-a5250f3ada78","publishedId":"UyrHdssW","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"192b49","highlight":"b1c8af"},"publishDate":"2022-06-01T13:56:19.000Z"},"item":[{"name":"Get Suppliers","id":"32163cd1-60f2-4c38-82ac-58b77c629e0b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{instance_url}}/v3/b2b/providers?related&id","description":"<p>The endpoint is used to return the users with the Supplier role registered in B2B<br />Enterprise, depending on the configuration of the parameters it receives, it can be returned  </p>\n<ul>\n<li><p>All users registered as suppliers,  </p>\n</li>\n<li><p>Related suppliers (that have a condition active trading) with a customer  </p>\n</li>\n<li><p>Unrelated providers (not having an active trading condition) with a customer</p>\n</li>\n</ul>\n","urlObject":{"path":["v3","b2b","providers"],"host":["{{instance_url}}"],"query":[{"description":{"content":"<p>(true / false) indicates if you want to return the providers related to a specific client (this parameter is optional, by default it is taken as false, that is, unrelated providers. However, it is only used, when the id parameter is not null in the request)</p>\n","type":"text/plain"},"key":"related","value":null},{"description":{"content":"<p>customer id (this parameter is optional, it indicates the id of the customer from which you want to get the related providers or no)</p>\n","type":"text/plain"},"key":"id","value":null}],"variable":[]}},"response":[{"id":"07610e9a-fd86-4872-ad3a-66958ed37dd5","name":"Get Suppliers","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{instance_url}}/v3/b2b/providers?related&id","host":["{{instance_url}}"],"path":["v3","b2b","providers"],"query":[{"key":"related","value":null,"description":"(true / false) indicates if you want to return the providers related to a specific client (this parameter is optional, by default it is taken as false, that is, unrelated providers. However, it is only used, when the id parameter is not null in the request)"},{"key":"id","value":null,"description":"customer id (this parameter is optional, it indicates the id of the customer from which you want to get the related providers or no)"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    //provider 1\n    {\n        \"id\": \"\",\n        \"email\": \"\",\n        \"status\": \"0/1\",\n        \"user\": {\n            \"name\": \"\",\n            \"surname\": \"\",\n            \"document_number\": \"\",\n            \"document_type\": {\n                \"id\": \"\",\n                \"document_type\": \"\"\n            }\n        },\n        \"address\": \"\",\n        \"id_bank\": \"id of the bank to which it belongs\",\n        \"account_name\": \"name of the account\",\n        \"admin_last_name\": \"administrator last name of the account\",\n        \"admin_position\": \"administrator position of the account administrator\",\n        \"document_type\": \"type of document of the administrator of the account\",\n        \"document_number\": \"document number of the account administrator\",\n        \"trade_code\": \"\",\n        \"payment_conditions\": {\n            \"customer\": \"\",\n            \"id\": \"\",\n            \"supplier_id\": \"\",\n            \"agreed_days\": \"\",\n            \"percentage\": \"\",\n            \"condition_type\": \"(base, advance, defer)\",\n            \"discount_rate\": \"\",\n            \"limit_amount\": \"\",\n            \"approval\": \"approval from receipt or approval\"\n        }\n    }, \n    {} //provider 2 - provider n \n]"}],"_postman_id":"32163cd1-60f2-4c38-82ac-58b77c629e0b"},{"name":"Get Clients","id":"36568b8c-c6ce-4acd-abaa-9f554cd4a64f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{instance_url}}/v3/b2b/clients?related&id","description":"<p>The endpoint It is used to return the users with the Client role registered in B2B<br />Enterprise, depending on the configuration of the parameters it receives, the following can be returned:</p>\n<ul>\n<li>All users registered as clients,</li>\n<li>Related clients (who have an active commercial condition) with a supplier</li>\n<li>unrelated clients (that do not have an active commercial condition) with a provider</li>\n</ul>\n","urlObject":{"path":["v3","b2b","clients"],"host":["{{instance_url}}"],"query":[{"description":{"content":"<p>(true / false) indicates if you want to return the related customers with a specific provider (this parameter is optional, by default it is taken as false, that is, unrelated clients. However, it is only used when the id parameter is not null in the request)</p>\n","type":"text/plain"},"key":"related","value":null},{"description":{"content":"<p>id of the provider (this parameter is optional, it indicates the id of the provider from which we want to Get related clients or not)</p>\n","type":"text/plain"},"key":"id","value":null}],"variable":[]}},"response":[{"id":"73d8ac9c-c6d2-42f4-9792-c540dff054d6","name":"Get Clients","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{instance_url}}/v3/b2b/clients?related&id","host":["{{instance_url}}"],"path":["v3","b2b","clients"],"query":[{"key":"related","value":null,"description":"(true / false) indicates if you want to return the related customers with a specific provider (this parameter is optional, by default it is taken as false, that is, unrelated clients. However, it is only used when the id parameter is not null in the request)"},{"key":"id","value":null,"description":"id of the provider (this parameter is optional, it indicates the id of the provider from which we want to Get related clients or not)"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    // customer 1\n    {\n        \"id\": \"\",\n        \"email\": \"\",\n        \"status\": \"0/1\",\n        \"user\": {\n            \"name\": \"\",\n            \"surname\": \"\",\n            \"document_number\": \"\",\n            \"document_type\": {\n                \"id\": \"\",\n                \"document_type\": \"\"\n            }\n        },\n        \"address\": \"\",\n        \"id_bank\": \"id of the bank to which it belongs\",\n        \"account_name\": \"name of the account\",\n        \"admin_last_name\": \"administrator last name of the account\",\n        \"admin_position\": \"administrator position of the account administrator\",\n        \"document_type\": \"type of document of the administrator of the account\",\n        \"document_number\": \"document number of the account administrator\",\n        \"trade_code\": \"\",\n        \"payment_conditions\": {\n            \"customer\": \"\",\n            \"id\": \"\",\n            \"supplier_id\": \"\",\n            \"agreed_days\": \"\",\n            \"percentage\": \"\",\n            \"condition_type\": \"(base, advance, defer)\",\n            \"discount_rate\": \"\",\n            \"limit_amount\": \"\",\n            \"approval\": \"approval from receipt or approval\"\n        }\n    },\n    {} // customer 2 - customer n\n]"}],"_postman_id":"36568b8c-c6ce-4acd-abaa-9f554cd4a64f"},{"name":"Get Transactions","id":"551f616b-6459-4e61-893d-91869e0dcc8e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{instance_url}}/v3/b2b/transactions?person_id&role&expired&pending&approved&paid&reject&emit&date_min&date_max&bank_id","description":"<p>The endpoint is used to return the transactions (invoices) registered in B2B Enterprise Depending on the configuration of the parameters it receives, the following can be returned:</p>\n<ul>\n<li>All invoices regardless of the state they are in,</li>\n<li>Invoices that are in a specific state (to be approved, approved paid, paid, etc.)</li>\n<li>The invoices of all the clients and providers of the platform, or filter by the id of the user<br />you want to consult</li>\n<li>Filter the transactions that belong to clients / providers of a specific bank, or of all banks<br />that registered</li>\n</ul>\n","urlObject":{"path":["v3","b2b","transactions"],"host":["{{instance_url}}"],"query":[{"description":{"content":"<p>customer or supplier to consult</p>\n","type":"text/plain"},"key":"person_id","value":null},{"description":{"content":"<p>role from the cu When you want to see the transactions</p>\n","type":"text/plain"},"key":"role","value":null},{"description":{"content":"<p>(true / false) indicates if you want to return the expired invoices (Advance,\nDeferred, Paid and Rejected)</p>\n","type":"text/plain"},"key":"expired","value":null},{"description":{"content":"<p>(true / false) indicates if you want to return the invoices To be Approved</p>\n","type":"text/plain"},"key":"pending","value":null},{"description":{"content":"<p>(true / false) indicates if you want to return the Approved invoices</p>\n","type":"text/plain"},"key":"approved","value":null},{"description":{"content":"<p>(true / false) indicates if you want to return the Paid invoices</p>\n","type":"text/plain"},"key":"paid","value":null},{"description":{"content":"<p>(true / false) indicates if you want to return the Rejected invoices</p>\n","type":"text/plain"},"key":"reject","value":null},{"description":{"content":"<p>(true / false) indicates whether You want to return the invoices To be Issued</p>\n","type":"text/plain"},"key":"emit","value":null},{"description":{"content":"<p>minimum filter date in reports</p>\n","type":"text/plain"},"key":"date_min","value":null},{"description":{"content":"<p>maximum filter date in reports</p>\n","type":"text/plain"},"key":"date_max","value":null},{"description":{"content":"<p>bank by which you want to filter</p>\n","type":"text/plain"},"key":"bank_id","value":null}],"variable":[]}},"response":[{"id":"5a49106e-955e-4aca-a433-ae2d1ee31306","name":"Get Transactions","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{instance_url}}/v3/b2b/transactions?person_id&role&expired&pending&approved&paid&reject&emit&date_min&date_max&bank_id","host":["{{instance_url}}"],"path":["v3","b2b","transactions"],"query":[{"key":"person_id","value":null,"description":"customer or supplier to consult"},{"key":"role","value":null,"description":"role from the cu When you want to see the transactions"},{"key":"expired","value":null,"description":"(true / false) indicates if you want to return the expired invoices (Advance,\nDeferred, Paid and Rejected)"},{"key":"pending","value":null,"description":"(true / false) indicates if you want to return the invoices To be Approved"},{"key":"approved","value":null,"description":"(true / false) indicates if you want to return the Approved invoices"},{"key":"paid","value":null,"description":"(true / false) indicates if you want to return the Paid invoices"},{"key":"reject","value":null,"description":"(true / false) indicates if you want to return the Rejected invoices"},{"key":"emit","value":null,"description":"(true / false) indicates whether You want to return the invoices To be Issued"},{"key":"date_min","value":null,"description":"minimum filter date in reports"},{"key":"date_max","value":null,"description":"maximum filter date in reports"},{"key":"bank_id","value":null,"description":"bank by which you want to filter"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"[\n    //Invoice 1\n    {\n        \"id\": \"\",\n        \"invoice_number\": \"\",\n        \"upload_date\": \"date of upload to the platform\",\n        \"payment_date\": \"date of payment\",\n        \"approval_date\": \"date of approval\",\n        \"supplier_payment_date\": \"supplier payment date\",\n        \"amount\": \"\",\n        \"description\": \"\",\n        \"customer_invoice_status\": {\n            \"description\": \"\"\n        },\n        \"supplier_invoice_status\": {\n            \"description\": \"\"\n        },\n        \"attachment\": \"\",\n        \"payment_card\": \"\",\n        \"payment_condition\": {\n            \"agreed_days\": \"\",\n            \"percentage\": \"\",\n            \"type_of_condition\": \"(base, advance, defer)\",\n            \"discount_rate\": \"\",\n            \"limit_amount\": \"\",\n            \"approval\": \"approval from reception or approval\"\n        },\n        \"customer_user\": {\n            \"id\": \"\",\n            \"first_name\": \"\",\n            \"last_name\": \"\",\n            \"email\": \"\",\n            \"bank\": \"\",\n            \"address\": \"\"\n        },\n        \"provider_user\": {\n            \"id\": \"\",\n            \"first_name\": \"\",\n            \"last_name\": \"\",\n            \"email\": \"\",\n            \"bank\": \"\",\n            \"address\": \"\"\n        }\n    },\n    {} //Invoice 2 - Invoice n\n]"}],"_postman_id":"551f616b-6459-4e61-893d-91869e0dcc8e"},{"name":"User Registration","id":"f52dccf8-ce63-4dba-bc3c-70db61f02ae9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Katty CA\",\n    \"document_type\": \"RUC\",\n    \"document_number\": \"1232133\",\n    \"email\": \"ckatty_demo@yopmail.com\",\n    \"password\": \"123\",\n    \"user_type\": \"business\",\n    \"agency_user_type\": \"business_admin\",\n    \"role_name\": 5,\n    \"items\": [\n        {\n            \"id\": 42,\n            \"description\": \"TELECOMMUNICATIONS\"\n        }\n    ],\n    \"b2b\": {\n        \" bank_id \": \" 5e95daf005de937ad03af649 \",\n        \" admin \": 0,\n        \" issuing_bank \": 0,\n        \" acquiring_bank \": 0,\n        \" seller \": 0,\n        \" buyer \": 1,\n        \" address \": \" zona industrial \",\n        \" admin_name \": \"Sebastian\",\n        \"admin_position\": \"CEO\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{instance_url}}/v3/api/register?is_profile=false","description":"<p>The endpoint is used to register all users of the platform, regardless of whether they are payers, suppliers, sub-profiles or banks.<br />It receives the information associated with the user to register: Name, surname, type and number of document, email, the types of industries associated with the client (in case of being a client / supplier) and depending on the type of user from where the endpoint is called , the role of the user to be created is sent, for example: Issuing Banks create and send Customer role, Purchasing Banks create and send Supplier role.<br />As a response, you get the user object created in the B2B Enterprise platform.</p>\n","urlObject":{"path":["v3","api","register"],"host":["{{instance_url}}"],"query":[{"key":"is_profile","value":"false"}],"variable":[]}},"response":[],"_postman_id":"f52dccf8-ce63-4dba-bc3c-70db61f02ae9"},{"name":"Load Invoice","id":"1ebd576e-b029-441c-8090-e0237077c0a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"invoice_number\": \"333\",\n    \"buyer_id\": \"5ef27823905a8e0ba8005972\",\n    \"date_sii\": \"202102\",\n    \"scheduled_payment\": {\n        \"periodicity_id\": 3,\n        \"start_date\": \"2021-02-11T04:00:00.000Z\",\n        \"ending_date\": \"2021-02-18T04:00:00.000Z\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{instance_url}}/v3/sii/load-invoice","description":"<p>The cliente load an invoice using this endpoint.</p>\n<p>The information is sent in raw value body in JSON format</p>\n","urlObject":{"path":["v3","sii","load-invoice"],"host":["{{instance_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1ebd576e-b029-441c-8090-e0237077c0a1"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]}},"event":[{"listen":"prerequest","script":{"id":"5d3b1cd5-68db-45b7-9b8a-0657d75ab9fe","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"7b80a28a-f9cc-4063-bd60-1d69a0781ee3","type":"text/javascript","exec":[""]}}]}