API: Requesting Data from Tradogram (GET)

This article provides a comprehensive list of all GET endpoints available in the Tradogram API (v1.0.4). These endpoints allow you to retrieve existing data for your procurement records and organizational configurations. Every request must include your Base64 encoded API key in the x-api-key HTTP header.

GET /requisitions

This endpoint retrieves a list of all requisitions or a single requisition record.

  • List All: GET /requisitions.
  • Single Fetch: GET /requisitions/{RequisitionCode} (requires a unique 12-character code).
  • Attachments: GET /requisitions/{RequisitionCode}/attachments.

Example 1: Fetching single requisition using RequisitionCode

curl -X GET 'https://api.tradogram.com/v1.0.4/requisitions/cmsU3LP8qKbL'
-H 'x-api-key: <YOUR BASE64 ENCODED API KEY>'

Response: Successful response will return JSON object of all requisitions with status 200.

Response Example

{
	"Requisitions": [
		{
			"RequisitionCode": "cmsU3LP8qKbL",
			"RequisitionName": "REQ-1010240218",
			"RequisitionNumber": "R-00015",
			"RequisitionStatus": "Open",
			"DateSent": "2024-10-10 16:47:46",
			"DueDate": "2024-10-31",
			"DateApproved": "2024-10-10 16:47:46",
			"DateClosed": "",
			"CreatedDate": "2024-10-10 16:28:26",
			"ModifiedDate": "2024-10-10 16:47:46",
			"RequisitionerName": "John Doe",
			"RequisitionerEmail": "johndoetradogram@gmail.com",
			"BuyerBranchName": "TDG-DEMO",
			"DepartmentName": "",
			"DepartmentNumber": "",
			"Notes": "",
			"DistributionLocationName": "TDG-DEMO",
			"DistributionAddress": "45 V St, Ottawa, ON, K2H 9E8, Canada",
			"DistributionAddressInfo": "45 V St",
			"DistributionAddressCity": "Ottawa",
			"DistributionAddressState": "Ontario",
			"DistributionAddressZip": "K2H 9E8",
			"DistributionAddressCountry": "Canada",
			"Currency": "CAD",
			"Subtotal": "11500.00",
			"DiscountTotal": "-575.00",
			"Taxes": [
				{
					"TaxName": "GST/HST",
					"TaxRate": "13.00",
					"Type": "PERCENTAGE"
				}
			],
			"TaxTotal": "1426.75",
			"FeesTotal": "50.00",
			"Total": "12401.75",
			"HiddenCosts": "0.00",
			"LineItems": [
				{
					"LineItemIndex": 1,
					"LineItemCode": "huTZ4YCX1PB6",
					"ProjectCode": "",
					"ProjectName": "",
					"ProjectNumber": "",
					"ProjectLineCode": "",
					"ProjectLineName": "",
					"ProjectLineNumber": "",
					"DepartmentName": "",
					"DepartmentNumber": "",
					"GLAccountName": "Expenses",
					"GLAccountNumber": "4000",
					"SupplierCode": "",
					"SupplierName": "",
					"ItemNumber": "28397",
					"ItemName": "Green Syrup",
					"ItemDescription": "Volume (L): 0.75",
					"UOMLabel": "Bottle",
					"UOMAmount": "2",
					"UOMUnit": "L",
					"Qty": "500",
					"UnitPrice": "23.00",
					"ItemSubtotal": "11500.00",
					"DeliveryDate": "2024-10-31 00:00:00",
					"ItemTaxName": "",
					"ItemTaxRate": "",
					"ItemTaxTotal": "",
					"CustomFields": [
						{
							"Label": "Bin#",
							"Value": "995"
						}
					],
					"Projects": [
						{
							"ProjectCode": "eO2RoBj6aOHp",
							"ProjectName": "Order Syrups",
							"ProjectNumber": "PJ-002",
							"ProjectLineCode": "HJKrbLoRJTRv",
							"ProjectLineName": "Green",
							"ProjectLineNumber": "28397",
							"SplitQty": "0.00",
							"SplitPercentage": "50.00",
							"SplitValue": "6200.88"
						},
						{
							"ProjectCode": "eO2RoBj6aOHp",
							"ProjectName": "Order Syrups",
							"ProjectNumber": "PJ-002",
							"ProjectLineCode": "XGWG32SyupRU",
							"ProjectLineName": "Orange",
							"ProjectLineNumber": "FD4903",
							"SplitQty": "0.00",
							"SplitPercentage": "50.00",
							"SplitValue": "6200.88"
						}
					],
					"Departments": [
						{
							"DepartmentCode": "ARfE5DLh45tH",
							"DepartmentName": "Administration",
							"DepartmentNumber": "1552",
							"SplitPercentage": "50.00",
							"SplitValue": "6200.88"
						},
						{
							"DepartmentCode": "rZVBsj47KacY",
							"DepartmentName": "HR",
							"DepartmentNumber": "4662",
							"SplitPercentage": "50.00",
							"SplitValue": "6200.88"
						}
					],
					"Categories": [
       					{
							"CategoryCode": "jk859CDBWU9H",
							"CategoryName": "Syrups and Flavouring"
						}
					]
				}
			],
			"CustomFields": [
				{
					"Label": "Account#",
					"Value": "1550"
				}
			],
			"HasAttachments": true,
 			"ActivityLog": [
				{
					"DateTime": "2024-10-10 16:28:26",
					"User": "John Doe",
					"Activity": "Created",
					"Notes": "",
					"Status": "Open"
				},
				{
					"DateTime": "2024-10-10 16:31:44",
					"User": "John Doe",
					"Activity": "Edited",
					"Notes": "",
					"Status": "Open"
				},
				{
					"DateTime": "2024-10-10 16:47:46",
					"User": "John Doe",
					"Activity": "Edited",
					"Notes": "",
					"Status": "Open"
				},
				{
					"DateTime": "2024-10-10 18:06:03",
					"User": "John Doe",
					"Activity": "Edited",
					"Notes": "",
  					"Status": "Open"
				}
			]
		}
	]
}

Example 2: Fetching file attachments from requisition. The “HasAttachments” value fromrequisition result above can be used to identify if a requisition has any file attachments init.

curl -
X GET 'https://api.tradogram.com/v1.0.4/requisitions/cmsU3LP8qKbL/attachments'
-H 'x-api-key: <YOUR BASE64 ENCODED API KEY>'

Response: Successful response will return JSON object of a requisition’s file attachmentrecord with status 200.

Response Example

{
 	"Page": 1,
	 "PerPage": 1,
	 "TotalRecords": 2,
	 "HasMorePages": true,
	 "Attachments": [
		 {
 			"base64": "/9j/4AAQSkZJRgABAgEASABIAAD/7Qq0------TRUNCATED------",
 			"type": "image/jpeg",
			"extension": "jpg",
 			"filename": "RF_64da71ad60576.jpg",
 			"title": "R26042301542",
 			"filesize": "225823"
 		}
 	]
}

Note: Only one attachment can be fetched at a time, so based on the “HasMorePages”value in the result above, use “page” parameter to navigate through next availableattachment record as below.

curl -
X GET 'https://api.tradogram.com/v1.0.4/requisitions/cmsU3LP8qKbL/attachments?pa
ge=2' -H 'x-api-key: <YOUR BASE64 ENCODED API KEY>'

GET /purchase_orders

Use this endpoint to retrieve purchase order records, including supplier and approval information.

  • List All: GET /purchase_orders.
  • Single Fetch: GET /purchase_orders/{POCode} (requires a unique 12-character code).
  • Attachments: GET /purchase_orders/{POCode}/attachments.

GET /invoices

This endpoint allows you to access a list of all invoices or a specific invoice record.

  • List All: GET /invoices.
  • Single Fetch: GET /invoices/{InvoiceCode} (requires a unique 12-character code).
  • Attachments: GET /invoices/{InvoiceCode}/attachments.

GET /deliveries

Retrieve delivery records to track the status of goods received against purchase orders.

  • List All: GET /deliveries.
  • Single Fetch: GET /deliveries/{DeliveryCode} (requires a unique 12-character code).
  • Attachments: GET /deliveries/{DeliveryCode}/attachments.

GET /expenses

This endpoint retrieves a list of all employee expenses or a specific expense record.

  • List All: GET /expenses.
  • Single Fetch: GET /expenses/{ExpenseCode} (requires a unique 12-character code).

GET /credit_notes

Use this endpoint to fetch a list of all credit notes or a specific record.

  • List All: GET /credit_notes.
  • Single Fetch: GET /credit_notes/{CreditNoteCode} (requires a unique 12-character code).
  • Attachments: GET /credit_notes/{CreditNoteCode}/attachments.

GET /branches

Retrieve the list of all company branches defined in your Tradogram profile.

  • List All: GET /branches.
  • Single Fetch: GET /branches/{BranchCode} (requires a unique 12-character code).

GET /suppliers

This endpoint retrieves master records for your suppliers.

  • List All: GET /suppliers.
  • Single Fetch: GET /suppliers/{SupplierCode} (requires a unique 12-character code).
  • Attachments: GET /suppliers/{SupplierCode}/attachments.

GET /gl_accounts

Retrieve the General Ledger (GL) accounts used for tracking financial transactions.

  • List All: GET /gl_accounts.
  • Single Fetch: GET /gl_accounts/{GLAccountCode} (requires a unique 12-character code).

GET /departments

Access the list of all organizational departments within Tradogram.

  • List All: GET /departments.
  • Single Fetch: GET /departments/{DepartmentCode} (requires a unique 12-character code).

GET /units

Retrieve the list of all Units of Measurement (UOM) available in the system.

  • List All: GET /units.

GET /taxes

Fetch a list of all tax configurations or a single tax record.

  • List All: GET /taxes.
  • Single Fetch: GET /taxes/{TaxCode} (requires a unique 12-character code).

GET /categories

Access a list of all categories or a specific category record.

  • List All: GET /categories.
  • Single Fetch: GET /categories/{CategoryCode} (requires a unique 12-character code).

GET /items

Retrieve your company’s item master records.

  • List All: GET /items.
  • Single Fetch: GET /items/{ItemCode} (requires a unique 12-character code).
  • Images: GET /items/{ItemCode}/images.
  • Attachments: GET /items/{ItemCode}/attachments.

GET /projects

This endpoint retrieves a list of all active projects or a single project record.

  • List All: GET /projects.
  • Single Fetch: GET /projects/{ProjectCode} (requires a unique 12-character code).

GET /locations

Retrieve storage and distribution locations configured in Tradogram.

  • List All: GET /locations.
  • Single Fetch: GET /locations/{LocationCode} (requires a unique 12-character code).

GET /approvals

Returns the approval matrix for a given transaction.

  • Endpoint: GET /approvals/{TransactionType}/{TransactionCode}.
  • Parameters: Requires a TransactionType (purchase_order, invoice, requisition, or expense) and the corresponding TransactionCode.

Was This Helpful?

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Tags:

No items found.