### Retrieve Kit Products Request Examples Source: https://developer.datagate-i.com/ Examples of how to perform a GET request to retrieve kit products using Go, Ruby, and Python. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://api.dgportal.net/kit-templates/{id}/products", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```ruby require 'rest-client' require 'json' headers = { 'Accept' => 'application/json', 'ClientId' => 'string', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://api.dgportal.net/kit-templates/{id}/products', params: { }, headers: headers p JSON.parse(result) ``` ```python import requests headers = { 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://api.dgportal.net/kit-templates/{id}/products', headers = headers) print(r.json()) ``` -------------------------------- ### Retrieve Product Templates Source: https://developer.datagate-i.com/ Examples for sending a GET request to retrieve a list of available product templates. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://api.dgportal.net/products-templates", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```ruby require 'rest-client' require 'json' headers = { 'Accept' => 'application/json', 'ClientId' => 'string', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://api.dgportal.net/products-templates', params: { }, headers: headers p JSON.parse(result) ``` ```python import requests headers = { 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://api.dgportal.net/products-templates', headers = headers) print(r.json()) ``` -------------------------------- ### Retrieve Products List (Python) Source: https://developer.datagate-i.com/ A Python example using the requests library to get a list of products. Make sure to provide the 'ClientId' and 'Authorization' headers. ```python import requests headers = { 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://api.dgportal.net/products', headers = headers) print(r.json()) ``` -------------------------------- ### Example Response for Retrieving Kit Templates Source: https://developer.datagate-i.com/ This is an example of a successful 200 OK response when retrieving a list of kit templates. It includes pagination details and a data array. ```JSON { "data": [ { "id": "string", "name": "string", "description": "string", "cost": 0, "sell": 0, "inAdvance": { "id": 0, "name": "string" }, "productCategory": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "proRata": true, "excludeSurcharges": true } ], "page": 0, "pageSize": 0, "pages": 0, "records": 0 } ``` -------------------------------- ### Example Agreements Response Source: https://developer.datagate-i.com/ This is an example of a successful (200 OK) response when retrieving a list of agreements. It includes pagination details and a data array. ```json { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "customer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "name": "string", "billingContactEmail": "string", "billingContactFirstName": "string", "billingContactLastName": "string", "billingFrequencyType": "string", "billingStartDate": "2019-08-24T14:15:22Z", "billingStartDateLocked": true, "ccBillingContactEmail": "string", "currency": { "id": 0, "name": "string" }, "dateStart": "2019-08-24T14:15:22Z", "dateEnd": "2019-08-24T14:15:22Z", "invoiceLayout": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "isDefault": true, "notes": "string", "paymentTerm": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "poNumber": "string", "site": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "taxRate": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "organizationId": 0 } ], "page": 0, "pageSize": 0, "pages": 0, "records": 0 } ``` -------------------------------- ### Example 200 Response for Agreement Details Source: https://developer.datagate-i.com/ This is an example of a successful response when retrieving agreement details. ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "customer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "name": "string", "billingContactEmail": "string", "billingContactFirstName": "string", "billingContactLastName": "string", "billingFrequencyType": "string", "billingStartDate": "2019-08-24T14:15:22Z", "billingStartDateLocked": true, "ccBillingContactEmail": "string", "currency": { "id": 0, "name": "string" }, "dateStart": "2019-08-24T14:15:22Z", "dateEnd": "2019-08-24T14:15:22Z", "invoiceLayout": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "isDefault": true, "notes": "string", "paymentTerm": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "poNumber": "string", "site": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "taxRate": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "organizationId": 0 } ``` -------------------------------- ### Example Response for Retrieving Price Book Products Source: https://developer.datagate-i.com/ This is an example JSON response when successfully retrieving a list of price book products. It details product attributes, pricing, and associated data. ```JSON { "data": [ { "id": "string", "name": "string", "label": "string", "costAmount": 0, "ratingType": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "ratingAmount": 0, "taxRate": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "allowProRata": true, "glCode": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "productCategory": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "templateProduct": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "isHidden": true } ], "page": 0, "pageSize": 0, "pages": 0, "records": 0 } ``` -------------------------------- ### Retrieve Customer Data Source: https://developer.datagate-i.com/ Examples for performing a GET request to retrieve customer information using various programming languages. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://api.dgportal.net/customers/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```ruby require 'rest-client' require 'json' headers = { 'Accept' => 'application/json', 'ClientId' => 'string', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://api.dgportal.net/customers/{id}', params: { }, headers: headers p JSON.parse(result) ``` ```python import requests headers = { 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://api.dgportal.net/customers/{id}', headers = headers) print(r.json()) ``` -------------------------------- ### Example Response for Creating a Rate Card Source: https://developer.datagate-i.com/ This is an example of a successful 200 OK response when creating a rate card, which returns the ID of the newly created rate card as a string. ```string "497f6eca-6276-4993-bfeb-53cbbbba6f08" ``` -------------------------------- ### Retrieve Agreement using Python Source: https://developer.datagate-i.com/ This Python example uses the requests library to perform a GET request to retrieve an agreement. The 'Accept' header and authorization token are required. ```Python import requests headers = { 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://api.dgportal.net/agreements/{id}', headers = headers) print(r.json()) ``` -------------------------------- ### GET /products Source: https://developer.datagate-i.com/ Retrieves a list of all available products. ```APIDOC ## GET /products ### Description Retrieves a list of products available in the system. ### Method GET ### Endpoint /products ### Parameters #### Header Parameters - **ClientId** (string) - Required - A unique GUID assigned to each integration. - **Authorization** (string) - Required - Bearer access token. ``` -------------------------------- ### Create Product Charge Source: https://developer.datagate-i.com/ Examples for sending a POST request to create a charge for a specific product. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://api.dgportal.net/products/{id}/charges", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```ruby require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json', 'Accept' => 'application/json', 'ClientId' => 'string', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://api.dgportal.net/products/{id}/charges', params: { }, headers: headers p JSON.parse(result) ``` ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://api.dgportal.net/products/{id}/charges', headers = headers) print(r.json()) ``` -------------------------------- ### GET /products-templates Source: https://developer.datagate-i.com/ Retrieves a paginated list of product templates. ```APIDOC ## GET /products-templates ### Description Retrieves a paginated list of product templates. ### Method GET ### Endpoint /products-templates ### Parameters #### Query Parameters - **page** (integer) - Optional - Page - **pageSize** (integer) - Optional - PageSize #### Header Parameters - **ClientId** (string) - Required - A clientId is a unique GUID or Globally Unique Identifier assigned to each integration. ### Response #### Success Response (200) - **data** (array) - List of product templates - **page** (integer) - Current page - **pageSize** (integer) - Page size - **pages** (integer) - Total pages - **records** (integer) - Total records #### Response Example { "data": [ { "bundle": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "code": "string", "costCentre": "string", "description": "string", "isExcludingSurcharges": true, "glCode": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "label": "string", "isAllowingProRata": true, "productCategory": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "supplier": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "isTaxInclusive": true, "inAdvance": { "id": 0, "name": "string" }, "productKit": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "charges": [ { "amount": 0, "amountPercentage": 0, "chargeType": { "id": 0, "name": "string" }, "cost": 0, "dateEnd": "2019-08-24T14:15:22Z", "dateStart": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "quantity": 0, "scopeType": { "id": 0, "name": "string" }, "sell": 0 } ] } ], "page": 0, "pageSize": 0, "pages": 0, "records": 0 } ``` -------------------------------- ### Example response for retrieving sites Source: https://developer.datagate-i.com/ This is a sample JSON response when successfully retrieving a list of sites from the API. ```json { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "address": { "postalAddress1": "string", "postalAddress2": "string", "city": "string", "postalCode": "string", "country": "string", "state": "string", "contactPhone": "string" }, "referenceCode": "string", "customer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "rateCard": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "externalReference": "string", "isHidingTaxes": true, "code": "string", "extraField1": "string", "extraField2": "string", "extraField3": "string", "extraField4": "string", "extraField5": "string" } ], "page": 0, "pageSize": 0, "pages": 0, "records": 0 } ``` -------------------------------- ### 200 OK Response Example Source: https://developer.datagate-i.com/ A sample JSON response body returned when the request is successful. ```json [ { "productId": "string", "productName": "string", "productLabel": "string", "supplier": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "productCategory": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "glCode": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "bundle": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "charges": [ { "amount": 0, "amountPercentage": 0, "chargeType": { "id": 0, "name": "string" }, "cost": 0, "dateEnd": "2019-08-24T14:15:22Z", "dateStart": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "quantity": 0, "scopeType": { "id": 0, "name": "string" }, "sell": 0 } ] } ] ``` -------------------------------- ### GET /products-templates Source: https://developer.datagate-i.com/ Retrieves a list of all available product templates. Requires ClientId and Authorization headers. ```APIDOC ## GET /products-templates ### Description Retrieves a list of all available product templates. ### Method GET ### Endpoint https://api.dgportal.net/products-templates ### Parameters #### Header Parameters - **ClientId** (string) - Required - A clientId is a unique GUID or Globally Unique Identifier assigned to each integration. This clientId is required for all API calls made by your integration. This will be used to monitor integration performance and systems' health. - **Authorization** (string) - Required - Bearer token for authentication. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **None** - Response schema not specified, likely returns a list of product templates. #### Error Response (default) - **code** (string) - Error code - **details** (string) - Error details - **error** (string) - Error message #### Response Example ```json { "code": "string", "details": "string", "error": "string" } ``` ``` -------------------------------- ### Create Price Book Product Source: https://developer.datagate-i.com/ Example of creating a price book product. Requires a ClientId in the header for authentication and monitoring. ```Go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://api.dgportal.net/rating/ratecards/{pbId}/products/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Create Product Template API Request Source: https://developer.datagate-i.com/ Implementation examples for creating a new product template using various programming languages. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://api.dgportal.net/products-templates", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```ruby require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json', 'Accept' => 'application/json', 'ClientId' => 'string', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://api.dgportal.net/products-templates', params: { }, headers: headers p JSON.parse(result) ``` ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://api.dgportal.net/products-templates', headers = headers) print(r.json()) ``` -------------------------------- ### Create a new site using Python Source: https://developer.datagate-i.com/ This Python example uses the requests library to create a new site. It correctly sets the 'Content-Type' and 'Accept' headers for the request. ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://api.dgportal.net/sites', headers = headers) print(r.json()) ``` -------------------------------- ### Example Default Error Response Source: https://developer.datagate-i.com/ This is an example of an error response returned by the API. It includes a code, details, and a general error message. ```json { "code": "string", "details": "string", "error": "string" } ``` -------------------------------- ### Create Product API Request Source: https://developer.datagate-i.com/ Examples of how to perform a POST request to the products endpoint using various programming languages. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://api.dgportal.net/products", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```ruby require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json', 'Accept' => 'application/json', 'ClientId' => 'string', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://api.dgportal.net/products', params: { }, headers: headers p JSON.parse(result) ``` ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://api.dgportal.net/products', headers = headers) print(r.json()) ``` -------------------------------- ### Create Agreement using Python Source: https://developer.datagate-i.com/ A Python example using the requests library to send a POST request for creating an agreement. Make sure to include your authorization token and ClientId in the headers. ```Python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://api.dgportal.net/agreements', headers = headers) print(r.json()) ``` -------------------------------- ### Example Response for Retrieving Rate Cards Source: https://developer.datagate-i.com/ This is an example of a successful 200 OK response when retrieving a list of rate cards, showing the structure of the returned data. ```json { "data": [ { "description": "string", "id": "string", "isDefault": true, "name": "string", "service": { "id": 0, "name": "string" }, "type": { "id": 0, "name": "string" }, "taxRate": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" } } ], "page": 0, "pageSize": 0, "pages": 0, "records": 0 } ``` -------------------------------- ### Create a new site using Go Source: https://developer.datagate-i.com/ This Go code snippet shows how to send a POST request to create a new site. It includes setting the 'Content-Type' and 'Authorization' headers. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://api.dgportal.net/sites", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Create a Kit Product API Request Source: https://developer.datagate-i.com/ Examples of how to perform the POST request to create a kit product using various programming languages. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://api.dgportal.net/kit-templates/{id}/products", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```ruby require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json', 'Accept' => 'application/json', 'ClientId' => 'string', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://api.dgportal.net/kit-templates/{id}/products', params: { }, headers: headers p JSON.parse(result) ``` ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://api.dgportal.net/kit-templates/{id}/products', headers = headers) print(r.json()) ``` -------------------------------- ### Create Price Book Product (Go) Source: https://developer.datagate-i.com/ This Go code demonstrates how to create a new product within a price book. It requires a JSON payload with product details and appropriate headers for authentication. ```Go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://api.dgportal.net/rating/ratecards/{pbId}/products", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Retrieve a List of Customer Users using Python Source: https://developer.datagate-i.com/ This Python snippet shows how to get a list of customer users using the 'requests' library. It sends a GET request with the required headers. ```Python import requests headers = { 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://api.dgportal.net/customer-users', headers = headers) print(r.json()) ``` -------------------------------- ### Retrieve Site Details (Go) Source: https://developer.datagate-i.com/ Demonstrates how to retrieve site details using the Go HTTP client. Ensure the ClientId and Authorization headers are correctly set. ```Go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://api.dgportal.net/sites/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Create a customer via API Source: https://developer.datagate-i.com/ Examples of how to perform a POST request to the /customers endpoint using various programming languages. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://api.dgportal.net/customers", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```ruby require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json', 'Accept' => 'application/json', 'ClientId' => 'string', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://api.dgportal.net/customers', params: { }, headers: headers p JSON.parse(result) ``` ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://api.dgportal.net/customers', headers = headers) print(r.json()) ``` -------------------------------- ### Create Kit Template (Python) Source: https://developer.datagate-i.com/ This Python example uses the requests library to create a kit template. It's crucial to set the 'Content-Type' and 'Accept' headers correctly and provide the necessary authentication. ```Python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'ClientId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://api.dgportal.net/kit-templates', headers = headers) print(r.json()) ``` -------------------------------- ### GET /products/{id} Source: https://developer.datagate-i.com/ Retrieves a specific product by its ID. ```APIDOC ## GET /products/{id} ### Description Retrieves a product. ### Method GET ### Endpoint https://api.dgportal.net/products/{id} ### Parameters #### Path Parameters - **id** (string(uuid)) - Required - Product ID #### Header Parameters - **ClientId** (string) - Required - A clientId is a unique GUID or Globally Unique Identifier assigned to each integration. This clientId is required for all API calls made by your integration. This will be used to monitor integration performance and systems' health. - **Authorization** (string) - Required - Bearer token for authentication. - **Accept** (string) - Optional - Specifies the desired response format, typically 'application/json'. ### Response #### Success Response (200) - **Description**: Product details #### Error Response (default) - **code** (string) - **details** (string) - **error** (string) ### Request Example ```json { "example": "request body" } ``` ### Response Example ```json { "code": "string", "details": "string", "error": "string" } ``` ``` -------------------------------- ### GET /kit-templates Source: https://developer.datagate-i.com/ Retrieves a paginated list of kit templates. ```APIDOC ## GET /kit-templates ### Description Retrieves a list of kit templates. ### Method GET ### Endpoint https://api.dgportal.net/kit-templates ### Parameters #### Query Parameters - **page** (integer) - Optional - Page - **pageSize** (integer) - Optional - PageSize #### Header Parameters - **ClientId** (string) - Required - A clientId is a unique GUID or Globally Unique Identifier assigned to each integration. ### Response #### Success Response (200) - **data** (array) - List of kit templates - **page** (integer) - Current page - **pageSize** (integer) - Items per page - **pages** (integer) - Total pages - **records** (integer) - Total records #### Response Example { "data": [ { "id": "string", "name": "string", "description": "string", "cost": 0, "sell": 0, "inAdvance": { "id": 0, "name": "string" }, "productCategory": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "proRata": true, "excludeSurcharges": true } ], "page": 0, "pageSize": 0, "pages": 0, "records": 0 } ``` -------------------------------- ### Retrieve Products List (Go) Source: https://developer.datagate-i.com/ Use this Go code to make a GET request to retrieve a list of products. Ensure you set the 'ClientId' and 'Authorization' headers correctly. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://api.dgportal.net/products", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### GET /rating/assignments Source: https://developer.datagate-i.com/ Retrieves a paginated list of rating assignments. ```APIDOC ## GET /rating/assignments ### Description Retrieves a list of assignments including site, customer, rate card, and service details. ### Method GET ### Endpoint /rating/assignments ### Parameters #### Header Parameters - **ClientId** (string) - Required - A clientId is a unique GUID or Globally Unique Identifier assigned to each integration. This clientId is required for all API calls made by your integration. ### Response #### Success Response (200) - **data** (array) - List of assignments - **page** (integer) - Current page number - **pageSize** (integer) - Number of records per page - **pages** (integer) - Total number of pages - **records** (integer) - Total number of records #### Response Example { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "isDefault": true, "startDate": "2019-08-24T14:15:22Z", "site": {"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string"}, "customer": {"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string"}, "rateCard": {"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string"}, "serviceItem": {"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string"}, "service": {"id": 0, "name": "string"} } ], "page": 0, "pageSize": 0, "pages": 0, "records": 0 } ``` -------------------------------- ### GET /customers Source: https://developer.datagate-i.com/ Retrieves a list of all customers associated with the integration. ```APIDOC ## GET /customers ### Description Retrieves a list of customers. ### Method GET ### Endpoint https://api.dgportal.net/customers ``` -------------------------------- ### GET /agreements/{id} Source: https://developer.datagate-i.com/ Retrieves a specific agreement by its ID. ```APIDOC ## GET /agreements/{id} ### Description Retrieves a specific agreement by its ID. ### Method GET ### Endpoint https://api.dgportal.net/agreements/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the agreement to retrieve. #### Header Parameters - **ClientId** (string) - Required - A clientId is a unique GUID or Globally Unique Identifier assigned to each integration. This clientId is required for all API calls made by your integration. This will be used to monitor integration performance and systems' health. - **Authorization** (string) - Required - Bearer token for authentication. - **Accept** (string) - Required - application/json ### Response #### Success Response (200) - **Agreement Object** (object) - Details of the agreement. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "customer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "name": "string", "billingContactEmail": "string", "billingContactFirstName": "string", "billingContactLastName": "string", "billingFrequencyType": "string", "billingStartDate": "2019-08-24T14:15:22Z", "billingStartDateLocked": true, "ccBillingContactEmail": "string", "currency": { "id": 0, "name": "string" }, "dateStart": "2019-08-24T14:15:22Z", "dateEnd": "2019-08-24T14:15:22Z", "invoiceLayout": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "isDefault": true, "notes": "string", "paymentTerm": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "poNumber": "string", "site": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "taxRate": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "organizationId": 0 } ``` ``` -------------------------------- ### Create Kit Template (Go) Source: https://developer.datagate-i.com/ This Go code shows how to send a POST request to create a new kit template. It requires setting the 'Content-Type' header to 'application/json' and providing the template data in the request body. ```Go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "ClientId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://api.dgportal.net/kit-templates", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### GET /sites Source: https://developer.datagate-i.com/ Retrieves a list of sites with optional filtering and pagination. ```APIDOC ## Retrieves a list of sites ### Description Retrieves a list of sites with optional filtering and pagination. ### Method GET ### Endpoint /sites ### Parameters #### Query Parameters - **customer.id** (string(uuid)) - Optional - Customer ID - **page** (integer) - Optional - Page number for pagination - **pageSize** (integer) - Optional - Number of records per page #### Header Parameters - **ClientId** (string) - Required - A clientId is a unique GUID or Globally Unique Identifier assigned to each integration. This clientId is required for all API calls made by your integration. This will be used to monitor integration performance and systems' health. - **Accept** (string) - Optional - Specifies the desired response format, typically application/json. - **Authorization** (string) - Required - Bearer token for authentication. ### Response #### Success Response (200) - **data** (array) - List of sites. Each site object contains details like id, name, address, customer information, etc. - **page** (integer) - Current page number. - **pageSize** (integer) - Number of records per page. - **pages** (integer) - Total number of pages. - **records** (integer) - Total number of records. #### Response Example ```json { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "address": { "postalAddress1": "string", "postalAddress2": "string", "city": "string", "postalCode": "string", "country": "string", "state": "string", "contactPhone": "string" }, "referenceCode": "string", "customer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "rateCard": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "externalReference": "string", "isHidingTaxes": true, "code": "string", "extraField1": "string", "extraField2": "string", "extraField3": "string", "extraField4": "string", "extraField5": "string" } ], "page": 0, "pageSize": 0, "pages": 0, "records": 0 } ``` ```