Goldgate a.k.a. "Flex API" Client Development Documentation
2024.05.29.0
Introduction
Jonel Engineering's Goldgate application provides a RESTful-like API for transferring data between Jonel Engineering's Access Unlimited (AUJS) product and third-party applications. This document describes this interface so that developers may write software to utilize its services.
The Goldgate service provides data security by requiring that HTTPS be used for all transactions, and it also utilizes authentication schemes to control who is able to access/update system data. There are two different authentication modes supported by the Goldgate server:
General Information
Data transferred to/from Goldgate is in JSON format, which is easy for both humans and machines to read and generate. It is important that this data is correctly structured and parsed in order to successfully interact with the Goldgate service, and almost every programming language has packages/libraries to facilitate manipulation of JSON data.
Since all requests are simply HTTP methods, parameters supplied in URLs must be formatted using standard HTTP URL formatting and escaping. Typically, HTTP GET methods supply their parameters in the URL, whereas other methods (such as POST) supply parameters and data in the request body. AuthTokens can be supplied either in the URL or the request body, regardless of the HTTP method type.
Goldgate supports a mix of both types of clients ("Pre-Defined Clients" and "External Users"); Clients using the older "Pre-Defined Clients" mode can access the server alongside clients using the newer "External Users" mode. Developers creating new clients are encouraged to use the simpler "External Users" logon mode as the "Pre-Defined Clients" mode will deprecated in the future.
For time conversions, please use the following link https://www.datetimetoticks-converter.com/
Currently, Goldgate provides the following API endpoints for interacting with the AUJS system:
| Endpoint | Description |
|---|
nonce/logon | These endpoints provide the authentication "handshake" used to authenticate a client |
lookups | This endpoint returns several "Look Up" tables referenced by other endpoints. |
customers | Provides a list of current AUJS customer data |
products | Provides a list of concrete products as well as "other" products defined in AUJS |
rawmaterials | Gets the list of raw materials/ingredients referenced by concrete products |
salespeople | Gets the list of sales people currently defined in AUJS |
quotes | Gets list of active quotes for a specified customer |
quote | Retreive details of a single quote specified by its Quote ID |
addquote | Allows a client system to insert a quote record into AUJS's database |
appconfig | Allows a remote client application to retrieve the latest configuration settings |
trucks | Gets list of truck identfiers and descriptions for specified system type |
trucktickets | Gets list of active ticket identfiers and descriptions for specified truck identfier |
ticket | Gets ticket details for specified ticket identfier |
ticketimages (GET) | Gets ticket image attachments for specified ticket identfier |
ticketimages (POST) | Sends ticket image attachments for specified ticket identfier |
closeticket | Updates fields and marks as complete the ticket specified by the ticket identfier |
customertickets | Gets a filtered list of ticket summary records for a specified customer |
customerorders | Gets a filtered list of order summary records for a specified customer |
trucklocation | Updates the GPS coordinates of the specified truck |
exporttickets | Returns details of tickets over specified date range |
employeetimes | Returns details of time clock activities |
orderchanges | Returns changes to customer orders |
authorizations | Returns a token with the requested Permission Tag authorizations for the specified client |
Usage
Before any transaction, a client must first "Log On" to the service using either their ClientId and ClientKey ("Pre-Defined Clients" mode) or ClientId and AuthInfo ("External Users" mode) credentials. Goldgate will then issue the client an AuthToken that must be provided with each subsequent request in order to access the other endpoints. AuthTokens are tied to the ClientId and IP address, and by default expire after 5 minutes. The typical scenario for interacting with the Goldgate service is to authenticate/log-on before each transaction. Each time a client authenticates, the old AuthToken is disabled and a new one is created.
When a client application first starts up, it should attempt to log-on to acquire an AuthToken and then if required it should download the lookup data via the "lookup" endpoint. This allows the client application to verify that communications with the Goldgate service are operational, and provides the latest reference data used by some of the other endpoints of the service. A client may request the lookup data at other times if desired, such as after some interval or on demand of the client's user. Lookup data typically does not change very frequently and it should not be required to refresh it more than once after starting the client.
After downloading the lookup data, the client can then request updated records for other AUJS data, such as customers, products, raw materials, and sales people. Many of these endpoints also return a "timestamp" value that identifies the point in time the records represent. The client can return this timestamp value on the next endpoint request to only retrieve records that have been changed/added since the last request. By not providing a timestamp value (or using the value of zero) the client can retrieve all records of the desired type. The client can retrieve each endpoint independently if desired, or all within the same log-on transaction as desired. The client may invoke these endpoints at whatever frequency (hourly/daily/monthly) is deemed appropriate, or on demand by the user if desired. There is no requirement that these endpoints be invoked as a group, and each can be invoked at different intervals and separate transactions if desired.
Endpoints
nonce
This endpoint is used in "Pre-Defined Clients" mode to obtain a one-time random value that will be encrypted by the client using its ClientKey. This value is associated with the specified ClientId and cannot be used by any other client. The client hashes the nonce value (using SHA256 HMAC) with its ClientKey and returns that hash value using Base64 encoding to the logon endpoint.
logon
This endpoint is used to prove a client has the proper credentials to obtain an Authorization Token ("AuthToken") to be used with the other endpoints of this API. "Pre-Defined Clients" must first obtain a nonce from the nonce endpoint, then provide the "Response" parameter with the received nonce value hashed with the client's ClientKey which is then Base64 encoded, and supplied along with the matching "ClientId" parameter. "External User" logons will generate and supply the "AuthInfo" parameter as described above (instead of the "Response" parameter) along with the associated "ClientId". Upon providing valid parameters, this endpoint will return an authentication token that is used to access the rest of the API.
| Item | Value |
|---|
| Method | POST |
| Example URL | https://server.com/goldgate/v1/logon |
| Example Request Data (Pre-Defined Client) | { "Payload": { "ClientId": "example-client-id", "Response": "Gs8UjChLT1P9n/+otalN3VHXVQ6YmtypkPNnAQI3nVY=" } } |
| Example Response | { "Payload": { "AuthToken": "C6482181-9E42-41FE-BFD4-EBD9F6B15939" } } |
| Item | Value |
|---|
| Method | POST |
| Example URL | https://server.com/goldgate/v1/logon |
| Example Request Data (External User) | { "Payload": { "ClientId": "user@example.com", "AuthInfo": "Sm9uZWwgRW5naW5lZXJpbmcsIEluYy4*1678462039" } } |
| Example Response | { "Payload": { "AuthToken": "AB580793-22E6-44F3-91AF-085E2BAE69F6" } } |
lookups
This endpoint returns several small "lookup" tables that are referenced in the other endpoints. These lookup tables typically are loaded once during client startup and are used to lookup details about a record.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/lookups?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1 |
| Example Response | { "Payload": { "JobTypes": [ { "Id": 1, "Description": "None" }, { "Id": 2, "Description": "Commercial" }, { "Id": 3, "Description": "State" } ], "Plants": [ { "Id": 1, "Name": "Valley R/M", "Longitude": "0.0000000000", "Latitiude": "0.0000000000", "SystemTypeId", "1", "Inactive", false }, { "Id": 4, "Name": "R/M Plant 2", "Longitude": "0.0000000000", "Latitiude": "0.0000000000", "SystemTypeId", "1", "Inactive", false } ], "RawMaterialTypes": [ { "Id": 0, "Description": "Agg Coarse" }, { "Id": 1, "Description": "Cement" }, { "Id": 2, "Description": "Admix" }, { "Id": 3, "Description": "Water" }, { "Id": 4, "Description": "Agg Fine" } ], "StatusTypes": [ { "Id": 1, "Description": "Bid Result" }, { "Id": 2, "Description": "Job Bidding" }, { "Id": 3, "Description": "Job Cancelled" } ], "TaxSchedule": [ { "Id": 1, "Description": "ANAHEIM" }, { "Id": 2, "Description": "LAHABRA" }, { "Id": 4, "Description": "BREA" } ], "UnitOfMeasureTypes": [ { "Id": 1, "Description": "CY" }, { "Id": 2, "Description": "LB" }, { "Id": 3, "Description": "GL" } ], "UsageTypes": [ { "Id": 1, "Description": "None" }, { "Id": 2, "Description": "Flatwork" }, { "Id": 3, "Description": "Foundation Footings" } ], "ShortLoadTypes": [ /* Added 2019-05-28 (V1.12.1.0) */ { "Id": 1, "Description": "Concrete" }, { "Id": 3, "Description": "None" } ], "TruckTypes": [ /* Added 2023-09-15 (V1.17.0.0) */ { "Id": 1, "Description": "10 YARD MIXER", "SystemType": "concrete" }, { "Id": 2, "Description": "9 YARD MIXER", "SystemType": "concrete" }, { "Id": 3, "Description": "BOTTOM DUMP", "SystemType": "aggregate" }, { "Id": 4, "Description": "FLATBED", "SystemType":"block" }, { "Id": 5, "Description": "RAIL CAR", "SystemType": "aggregate" } ] } } |
customers
Retrieves the selected customer detail records from AUJS. Each response to this endpoint supplies a "TimeStamp" value that can be passed into the next invocation of this endpoint to retrieve only records that have been changed or added since the last request. Supplying zero for the TimeStamp argument or omitting the TimeStamp parameter will return all records.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/customers?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1&TimeStamp=635859944000000000 |
| Example Response | { "Payload": { "TimeStamp": 637812372680000000, "Customers": [ { "Id": 2, "Name": "Jonel Materials", "Number": "1006", "Address1": "191 Foster Place", "Address2": "", "City": "Fullerton", "State": "Ca", "Zip": "92832", "Inactive": false, "PurchaseConcrete": true, "PurchaseAggregate": true, "PurchaseBlock": true, "ShortLoadTypeId": 1, "Internal": true, "EmailAddress": "", "PhoneNumber": "7148792360", "MobileNumber": "", "ContactName": "Craig Concrete", "Notes": "", "DefaultPaymentType": "Charge", "CreditLimit": 4400.00, "EnforceCreditLimit": false, "CreditStatusId": 3, "CreditStatus": "Purchase order required", "Discount": false, "PurchaseOrderRequired": true, "CustomerJobNumberRequired": false, "QuoteNumberRequired": false, "LotBlockRequired": false, "InvoiceDeliveryPrint": true, "InvoiceDeliveryEmail": false }, { "Id": 8, "Name": "Acme Ready Mix", "Number": "1001", "Address1": "505 N State College Blvd", "Address2": "", "City": "Fullerton", "State": "CA", "Zip": "92831", "Inactive": false, "PurchaseConcrete": true, "PurchaseAggregate": true, "PurchaseBlock": true, "ShortLoadTypeId": 1, "Internal": false, "EmailAddress": "sales@jonel.com", "PhoneNumber": "7148792360", "MobileNumber": "", "ContactName": "Buck Starrs", "Notes": "", "DefaultPaymentType": "COD", "CreditLimit": 250000.00, "EnforceCreditLimit": false, "CreditStatusId": 1, "CreditStatus": "OK to sell", "Discount": true, "PurchaseOrderRequired": false, "CustomerJobNumberRequired": false, "QuoteNumberRequired": false, "LotBlockRequired": false, "InvoiceDeliveryPrint": true, "InvoiceDeliveryEmail": false } ] } }} |
products
Retrieves the selected concrete product and other product detail records from AUJS. Each response to this endpoint supplies a "TimeStamp" value that can be passed into the next invocation of this endpoint to retrieve only records that have been changed or added since the last request. Supplying zero for the TimeStamp argument or omitting the TimeStamp parameter will return all records.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/products?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1&TimeStamp=635877907760000000 |
| Example Response | { "Payload": { "TimeStamp": 635877907760000000, "Concrete": [ { "Id": 12, "Number": "02A4001", "Description": "02A4001", "PSI": 2.0, "Slump": 120.0, "Air": "1-4", "WaterToCementRatio": 0.96, "AggregateSize": "A", "SackEquivalent": 5.5, "CementType": "IV", "Inactive": false, "Plants": [ { "Id": 1, "Materials": [ { "Id": 1020, "Number": "SAND", "Description": "SAND", "Quantity": 1915.0, "UomId": 2, "PerHundredWeight":false }, { "Id": 1025, "Number": "WATER", "Description": "WATER", "Quantity": 220.0, "UomId": 3, "PerHundredWeight":true } ] }, { "Id": 4, "Materials": [ { "Id": 1020, "Number": "SAND", "Description": "SAND", "Quantity": 2250.0, "UomId": 2, "PerHundredWeight":false }, { "Id": 1025, "Number": "WATER", "Description": "WATER", "Quantity": 180.0, "UomId": 3, "PerHundredWeight":true } ] } ] } ], "Aggregate": [ { "Id": 47, "Number": "38-4772", "Description": "3/8 Dark Rock", "UomId": 6, "Price": 180.00, "Inactive": false, "Plants": [ { "Id": 8 }, { "Id": 3 } ] } ], "Block": [ { "Id": 91, "Number": "8x8x4", "Description": "8x8x4 Architectural", "UomId": 5, "Price": 6.75, "Inactive": false, "Plants": [ { "Id": 12 } ] } ], "Other": [ { "Id": 62, "Number": "1003", "Description": "Block Weekend Delivery Charge", "UomId": 1, "Price": 21.95, "Inactive": false, "Plants": [ { "Id": 1 }, { "Id": 4 } ] } ] } } |
rawmaterials
Retrieves the selected raw material detail records from AUJS. Each response to this endpoint supplies a "TimeStamp" value that can be passed into the next invocation of this endpoint to retrieve only records that have been changed or added since the last request. Supplying zero for the TimeStamp argument or omitting the TimeStamp parameter will return all records.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/rawmaterials?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1&TimeStamp=635877907760000000 |
| Example Response | { "Payload": { "TimeStamp": 635418363360000000, "RawMaterials": [ { "Id": 4, "Number": "1", "Description": "Cement Type I", "RawMaterialTypeId": 1, "Inactive": false, "Plants": [ { "Id": 1 , "UomId": 2, "CurrentCost": 117.38, "HaulCost": 20.75 } ] }, { "Id": 212, "Number": "12", "Description": "WRDA 79", "RawMaterialTypeId": 3, "Inactive": false, "Plants": [ { "Id": 1, "UomId": 4, "CurrentCost": 13.88, "HaulCost": 0.00 }, { "Id": 3, "UomId": 4, "CurrentCost": 12.90, "HaulCost": 1.00 }, { "Id": 4 , "UomId": 2, "CurrentCost": 14.10, "HaulCost": 2.00 } ] } ] } } |
salespeople
Retrieves the sales people detail records from AUJS. Each response to this endpoint supplies a "TimeStamp" value that can be passed into the next invocation of this endpoint to retrieve only records that have been changed or added since the last request. Supplying zero for the TimeStamp argument or omitting the TimeStamp parameter will return all records.
quotes
This endpoint allows you to retrieve quotes for a specific customer. You can specify the system type (Aggregate, Block, or Concrete) and a Ship Date to select quotes that cover the specified date. Along with the required AuthToken parameter this endpoint accepts the following parameters:
| Parameter | Description |
|---|
CustomerId | Required. An integer value that selects which customer's quotes should be searched |
SystemType | Optional. Must be one of the following string values: Aggregate, Block, or Concrete. If invalid or not specified, Concrete is assumed. |
ShipDate | Optional. A string in the form "YYYY-MM-DD" specifying a date to use for selecting quotes to return. Quotes with Start/Terminate dates containing this date will be returned. If this parameter is not specified or is invalid, today's date is assumed. |
| Item | Value |
|---|
| Method | GET |
| Example Request | https://server.com/goldgate/v1/quotes?AuthToken=A9CB4B2F-7512-415B-9B22-51178AADD15F&CustomerId=5&SystemType=Concrete&ShipDate=2024-05-15 |
| Example Response | { "Payload": { "Quotes": [ { "Id": 1, "Number": 1, "Name": "Smith Construction", "Address1": "1234 Main St", "Address2": "", "City": "Anytown", "County": "Bloomsfield", "State": "KZ", "Country": "US", "Zip": "55555", "SpecJob": false }, { "Id": 22, "Number": 4, "Name": "Buy N Large", "Address1": "2442 Walley Way", "Address2": "", "City": "Springfield", "County": "Zepplin", "State": "UY", "Country": "US", "Zip": "12121", "SpecJob": true } ] } }
|
quote
Retrieve details (including quoted products) of the specified quote. You can specify the system type (Aggregate, Block, or Concrete) to select products of the specified type. Along with the required AuthToken parameter this endpoint accepts the following parameters:
| Parameter | Description |
|---|
QuoteId | Required. An integer value that selects which quote details should be returned |
SystemType | Optional. Must be one of the following string values: Aggregate, Block, or Concrete. If invalid or not specified, Concrete is assumed. |
| Item | Value |
|---|
| Method | GET |
| Example Request | https://server.com/goldgate/v1/quote?AuthToken=9E4C1950-71F4-4ED7-B0AB-DFCBC780EBBC&QuoteId=1&SystemType=Concrete |
| Example Response | { "Payload": { "Quote": { "Id": 1, "Number": 1, "Name": "Smith Construction", "Address1": 1234 Main St", "Address2": "", "City": "Anytown", "County": "Anytown", "State": "KZ", "Country": "US", "Zip": "55555", "SpecJob": false, "NotBefore": "2024-04-01T00:00:00", "NotAfter": "2024-12-31T00:00:00", "PlantId": 1, "SystemType": "Concrete", "SalesPerson": "Sanchez, Rick", "Products": [ { "Id": 1024, "Number": "114", "Description": "2000P1", "Price": 102.5, "UOM": "CU Yards", "Usage": "", "ProductType": "Concrete", "ProductTypeId": 1, "FormulaSlump": 4.5 }, { "Id": 12, "Number": "215", "Description": "4000 RJR PMP", "Price": 104, "UOM": "CU Yards", "Usage": "", "ProductType": "Concrete", "ProductTypeId": 1, "FormulaSlump": 6.0 }, { "Id": 181773, "Number": "FIBER", "Description": "FIBER", "Price": 10, "UOM": "Each", "Usage": "", "ProductType": "Other", "ProductTypeId": 5, "FormulaSlump": null } ] } } } |
addquote
This endpoint is used to add (import) a new quote into the AUJS system. The client system will build the quote data using the records obtained from this API and supply the following data in the body of the request.
| Item | Value |
|---|
| Method | POST |
| Example URL | https://server.com/goldgate/v1/addquote |
| Example Request | { "AuthToken": "d03fe4c9-b13e-4b0d-b388-2346a2ab08b1", "Payload": { "CustomerId": "54", "QuoteName": "Big Dan's Parking Lot #2", "QuoteDate": "2017-03-28", "Address1": "500 E. Walnut Ave.", "Address2": "PO Box 798", "City": "Fullerton", "County": "Orange", "State": "CA", "Country": "USA", "Zip": "92832", "CustomerPO": "98-4451", "SalesLimit": 99999.99, "TaxScheduleId": 1, "IsNonTaxable": false, "ConcreteStartDate": "2016-04-01", "ConcreteEndDate": "2016-04-01", "ConcretePlantId": 1, "ConcreteSalesPersonId": 25, "AggregateStartDate": "", "AggregateEndDate": "", "AggregatePlantId": 0, "AggregateSalesPersonId": 0, "BlockStartDate": "", "BlockEndDate": "", "BlockPlantId": 0, "BlockSalesPersonId": 0, "Notes": "This is an imported test quote", "TicketNotes": "This note should appear on tickets", "Products": [ { "ProductId": "1024", "Description": "2000P1", "Quantity": 110, "Price": 55.50, "FreightRate": 0.00, "UsageTypeId": 1, "SystemTypeId": 1 }, { "ProductId": "12", "Description": "4000 RJR PMP", "Quantity": 200, "Price": 75.00, "FreightRate": 0.00, "UsageTypeId": 1, "SystemTypeId": 1 } ] } } |
| Example Response | { "Payload": { "Success": true, "QuoteId": 942 } } |
appconfig
Retrieves the latest configuration settings for the specified appId and version. "appid" must be specified and is the assigned application identifier to retreive the configuration for. "ver" is the version number of the configuration settings to be retreived. If "ver" is missing or blank, then the first matching configuration for the specified version is returned. If ver is specified but does not match any configured versions, then the returned Config object is undefined. To protect the back-end from processing too many requests, this endpoint is rate-limited - making too many requests within a period of time will result in a 403-Forbidden response.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/appconfig?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1&appid=app.id&ver=1.0 |
| Example Response | { "Payload": { "Config": { "Images": { "logo": "iVBORw0...R5wAAAABJRU5ErkJggg==" }, "Colors": { "Primary": "064C82", "Secondary": "606060" }, "Strings": { "Terms": "<b>Jonel Engineering</b><br/>This is just a test program, <i>so relax!</i> You can always worry about the real thing later.<br><sub>Revision 2017.08.14</sub>", "Waiver": "<b>Damage Waiver</b><br/><i>It's not our fault!</i> Have a nice day<br><sub>Revision 2017.12.12</sub>", "Customer": "Arizona Materials", "NoteTemplates": [ "Template 1", "Template 2", "Driver ran over cat", "Gunfight ensued" ] }, "Screens": { "LoadDetails": { "Fields": [ { "Label": "Shortload Charge", "Value": "ShortloadChargeTotal", "Format": "%.2f" }, { "Label": "Slump", "Value": "Slump", "Format": "%.1f" }, { "Label": "Tax Rate", "Value": "TotalSalesTaxRate", "Format": "%.3f" }, { "Label": "Tax Amount", "Value": "TotalSalesTax", "Format": "%.2f" }, { "Label": "Order Total", "Value": "OrderTotal", "Format": "%.2f" }, { "Label": "Customer PO #", "Value": "Customer.PONumber", "Format": "s" } ] }, "BatchWeights": { "Fields": [ { "Label": "Max Allowed Water", "Value": "AllowableWater", "Format": "%.1f" }, { "Label": "Batched Water", "Value": "BatchWater", "Format": "%.1f" }, { "Label": "Load Weight", "Value": "TotalRawMaterialWeight", "Format": "%.0f" }, { "Label": "W/C Ratio Target", "Value": "WaterCementRatioTarget", "Format": "%.3f" }, { "Label": "W/C Ratio Actual", "Value": "WaterCementRatioActual", "Format": "%.3f" }, { "Label": "Agg Moisture %", "Value": "AggregateMoisture", "Format": "%.1f" } ] } }, "Settings": { "SystemType": "concrete", "CylinderTestDefault": false } } } } |
trucks
Retrieves a list of trucks of the specified company type. "type" can be one or more of "aggregate", "concrete" or "block", separated by a hyphen (-). If "type" is not specified, then "concrete" is assumed. The list of trucks does not change frequently, so it it sufficient to invoke this endpoint once at the start of a session. To protect the back-end from processing too many requests, this endpoint is rate-limited - making too many requests within a period of time will result in a 403-Forbidden response.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/trucks?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1&type=aggregate-concrete |
| Example Response | { "Payload": { "Trucks": [ { "Id": 14, "Number": "101", "Company": "Rock Movers", "TruckType": "Agg Hauler", "SystemType": "aggregate" }, { "Id": 18, "Number": "132", "Company": "Rock Movers", "TruckType": "Agg Hauler", "SystemType": "aggregate" }, { "Id": 23, "Number": "101", "Company": "Shoddy Materials", "TruckType": "Dump Truck", "SystemType": "aggregate" }, { "Id": 28, "Number": "101", "Company": "", "TruckType": "Mixer", "SystemType": "concrete" }, { "Id": 33, "Number": "1132", "Company": "", "TruckType": "Mixer", "SystemType": "concrete" }, ] } } |
trucktickets
Retrieves a list of currently active tickets for the specified truckId. Note this is not the truck "Number", but the "Id" field as returned by the trucks endpoint.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/trucktickets?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1&truckId=23 |
| Example Response | { "Payload": { "TruckId": 3, "Tickets": [ { "Id": 14552, "Number": "104112", "StatusId": 6, "HasWeights": true, "TruckNumber": "101", "OrderNumber": "112", "CustomerName": "Sloppy Construction", "JobAddress": "42112 S. Elm St." }, { "Id": 14597, "Number": "104137", "StatusId": 1, "HasWeights": false, "TruckNumber": "101", "OrderNumber": "93", "CustomerName": "Lazy Contractors", "JobAddress": "332 Rocket Rd." } ] } } |
ticket
Retrieves the ticket details for the ticket specified using "TicketId". Note this is not the same as "TicketNumber". If the "Signature" parameter is supplied and set to "true", the Base64 encoded image of the signature along with the "TermsAndConditions" and "Waiver" fields are included in the response if available. If the "ForcePricing" parameter is supplied and set to "true", product pricing information will be returned regardless of the ticket's ChargeOrder status. To protect the back-end from processing too many requests, this endpoint is rate-limited - making too many requests within a period of time will result in a 403-Forbidden response.
| Item | Value |
|---|
| Method | GET |
| Parameters | AuthToken (string, required) - Authentication token provided by logon.
TicketId (integer, required) - Id number of ticket to return (Not the same as the TicketNumber).
Signature (bool, optional) - If true indicates that signature image data should be returned in addition to standard fields.
ForcePricing (bool, optional) - If true indicates product pricing should be returned regardless of ticket's ChargeOrder status. |
| Example URL | https://server.com/goldgate/v1/ticket?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1&TicketId=14552&Signature=true&ForcePricing=false |
| Example Response | { "Number": "13", "TicketId": 1171, "SystemTypeId": 1, "StatusId": 3, "OrderNumber": "1", "ShipDate": "2016-10-19 00:00:00", "OrderDate": "2016-10-19 00:00:00", "DueOnJob": "0000-00-00 09:13:00", "LoadInterval": "0000-00-00 00:12:00", "TicketDateTime": "2016-10-19 08:15:00", "BatchDateTime": "2016-10-19 10:02:23", "PrintDateTime": "2016-10-19 09:57:41", "LoadedDatetime": "2016-10-19 10:02:23", "ToJobDatetime": "2016-10-19 10:03:09", "OnJobDatetime": "2016-10-19 10:19:32", "StartedUnloadDatetime": "2016-10-19 10:24:17", "FinishedUnloadDatetime": "2016-10-19 10:36:41", "LeaveJobDatetime": "2016-10-19 10:37:05", "ArrivePlantDatetime": "2016-10-19 10:56:51", "SuspendDateTime": "", "LoadNumber": 2, "ProductNumber": "114", "Quantity": 2.0, "Slump": 4.0, "FormulaSlump": 4.0, "SlumpOrdered": 4.0, "Strength": 2000.0, "AggregateSize": "3/4"", "AggregateMoisture": 0.0, "AllowableWater": 0.0, "Water": 188.5, "FreeWater": 0, "BatchWater": 188.5, "WaterAdded": 19.50, "WaterAddedJob": 7.00, "WaterAddedPlant": 12.50, "WaterCementRatioTarget": 0.221, "WaterCementRatioActual": 0.219, "TotalRawMaterialWeight": 21335, "TareWeight": 0.0, "TareWeightDateTime": "", "ManualTareWeight": false, "StandbyMinutes": 0.0, "WaitMinutes": 4, "PreviousBalance": 374.5, "ShortloadChargeTotal": 0, "DeliveryChargeTotal": 0.0, "NonWorkdayChargeTotal": 0.0, "OrderTotal": 481.5, "TicketTotal": 481.5, "TotalSalesTax": 29.75, "TotalSalesTaxRate": 7.0, "AggregateDeliveryChargeRate": 0.0, "MilesToJob": 0, "TaxLocationDescription": "Nevada", "OrderedByName": "", "ReceiverName": "mortys", "BatchmanName": "Leadfoot, James", "BatchmanLicense": "", "UserName": "Chetu", "DriverName": "Sanchez, Rick", "DriverInitials": "RS", "DriverNumber": "2344", "UsageType": "", "TicketNotes": "", "DispatchNotes": "", "BatchNotes": "", "DriverNotes": "", "AttachedImageCount": 0, "ZoneReferenceNumber": "", "TruckNumberPrevious": "", "SuburbDescription": "Northfield", "SuburbToPlantDistance": 0, "QuoteNumber": "0", "QuoteName": "", "QuoteAddress": "", "CreditCardApprovalCode": "", "Imperial": true, "ChargeOrder": false, "ShowBatchWeights": true, "UploadMixToPanel": 0, "NonTaxable": false, "CylinderTaken": false, "WaiverRequired": true, "IsInactive": false, "ScheduleFirstLoadOnJobTime": "2016-10-19 12:00:00", "Signature": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjkxOUU2NzFDNDE5MTExRTY5NTE5Rjk1N0VCNzNDOEMwIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjkxOUU2NzFENDE5MTExRTY5NTE5Rjk1N0VCNzNDOEMwIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTE5RTY3MUE0MTkxMTFFNjk1MTlGOTU3RUI3M0M4QzAiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6OTE5RTY3MUI0MTkxMTFFNjk1MTlGOTU3RUI3M0M4QzAiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6OrktEAAAC2UlEQVR42nRTXUiTURh+vp+5zU03da4f06ZDpLlg1vwpC3ZRIGllN1YUuTC8SUi7iG7KvOgiuvKmm6AMCWI3KuJFFCiKFV3YyrC1kH1gNHWW5r65uX0/nbNwOMoDD+/5vve8z/u873kPgx1WKBSyKYpio3u73T6x0zlm+0d1z2uzxZTTy/OMt9jIm2e/x+G0anDBbcLKWnI4vBLvv9t5PIuMzQR3v2oFz4U4naZb5DTmo1UmOO15uNRoQSSuIlfPt/qmf46f6R59+o8CZ9dLj6rlx40FehhMOiwmgcfNVlSYOJAyIEkSbvsWsBgWESEo5JWBycG2q2kFgiCYjTpuCBoeIhG0KLFwlRkRUxhwHAeGYcCyLG6ctCImkwjybzUqea/dGvGmCXpfCF4xqZjBMjDoeDxp2YVH5HDtntxMMLUbKRUqCairMhLdDISFWG+aoMDAt1NPRZEG1+vMqCzMgaqqadC1fR8nJO+DIhw2A6KiZOvo8rl4jyPPtRSVULFbi/lIAl+X46i0aNMBtP4tgufvfgGyQn9ibn4DiKWQZzR4WOd+A6pL9PgUiqK6mEdwaQOyLKcbRy0FJYqRACRlMCnlLxHBR/+qmafOi8csaIhs4v5YGMubwHRwHZdrC1BOyqJ+ipaDRnyejUDPyIgnJUIko7wqX2ACgcA4aZSHNqv1QQDQcOlOW008jlQYcL6hEHoNMtc5NhHGoC8Egyqj/2FNDUscz7akNpMsEIkEMYHlHyJGJhdBpi+rFJVkZhIpnD21V6ivr/ezDodjgDgFeqD9hBV1ZVow0ThBArWlOSi18BkCiqmpMJCS8OZtpCczyoT5HJG3RjM0kbmnCsrygJtt+7IaOvdlFQqp/3RzycDoSMdw1mPy+/0uYoYIbD13PqDzih0HKvMz10gRIddMVl9TU+O9/77GmZkZMzHe4Lff7evrKdfhQ0VbQ7RGQDP2ud1uYXvMHwEGAK7Kb7Klsiu1AAAAAElFTkSuQmCC", "TermsAndConditions": "The Terms and Conditions text captured with the signature image.", "Waiver": "The Damage Waiver text captured with the signature image.", "EmailRecipients": [ "support@jonel.com", "rick@morty.net" ], "Customer": { "Number": "1002", "Name": "Better Built Construction", "Phone": "7148792360", "PONumber": "", "JobNumber": "", "JobNumberQuote": "" }, "Job": { "Number": "37", "Description": "123 auto ticket", "Phone": "", "LotNumber": "", "MapReferenceDescription": "A1B1", "TypeDescription": "None", "Latitude": 33.8687888, "Longitude": -117.9175194, "Address": { "Address1": "123 auto ticket", "Address2": "", "City": "Ashton", "County": "", "State": "", "Country": "", "Zip": "" } }, "Truck": { "Number": "102", "Description": "102", "LicensePlate": "2CAL2222", "CompanyName": "Jonel Internal", "CompanyNumber": "" }, "Plant": { "PlantId": 4, "Description": "San Angeles #3", "Alley": "0", "Address": { "Address1": "200 W. Valley", "Address2": "", "City": "Fullerton", "County": "", "State": "CA", "Country": "", "Zip": "92832" } }, "BillingAddress": { "Address1": "P.O. Box 773", "Address2": "", "City": "Fullerton", "County": "", "State": "CA", "Country": "", "Zip": "92832" }, "Products": [ { "ProductId": 12, "Number": "114", "Description": "2000P1", "Taxable": true, "TicketQuantity": 2.0, "ExtendedTicketQuantity": 2.0, "OrderQuantity": 6.0, "UnusedQuantity": 0.0, "ShippedQuantity": 0.0, "ExtendedShippedQuantity": 0.0, "Price": 50.0, "ExtendedPrice": 100.0, "BlockWeight": 0.0, "UOM": "CY", "UOM_Id": 1 }, { "ProductId": 1008, "Number": "SL-100", "Description": "ShortLoad Charges", "Taxable": true, "TicketQuantity": 1.0, "ExtendedTicketQuantity": 1.0, "OrderQuantity": 0.0, "UnusedQuantity": 0.0, "ShippedQuantity": 0.0, "ExtendedShippedQuantity": 0.0, "Price": 0.0, "ExtendedPrice": 0.0, "BlockWeight": 0.0, "UOM": "EA", "UOM_Id": 5 }, { "ProductId": 1031, "Number": "DTDELVTIME", "Description": "DELIVERY TIME D/T", "Taxable": true, "TicketQuantity": 5.0, "ExtendedTicketQuantity": 5.0, "OrderQuantity": 6.0, "UnusedQuantity": 0.0, "ShippedQuantity": 0.0, "ExtendedShippedQuantity": 0.0, "Price": 65.0, "ExtendedPrice": 325.0, "BlockWeight": 0.0, "UOM": "EA", "UOM_Id": 5 } ], "Ingredients": [ { "ProductId": 2, "Number": "413", "Description": "3/4" Aggregate", "DrawNumber": 1, "UOM": "LB", "Target": 44.0, "Actual": 0.0, "MoisturePercentage": 0.0, "AbsorptionPercentage": 0.0 }, { "ProductId": 3, "Number": "411", "Description": "SAND", "DrawNumber": 1, "UOM": "LB", "Target": 2800.0, "Actual": 0.0, "MoisturePercentage": 6.7, "AbsorptionPercentage": 0.0 }, { "ProductId": 6, "Number": "415", "Description": "3/8 Pea Rock", "DrawNumber": 1, "UOM": "LB", "Target": 400.0, "Actual": 0.0, "MoisturePercentage": 0.0, "AbsorptionPercentage": 0.0 }, { "ProductId": 8, "Number": "422", "Description": "FLYASH", "DrawNumber": 1, "UOM": "LB", "Target": 90.0, "Actual": 0.0, "MoisturePercentage": 0.0, "AbsorptionPercentage": 0.0 }, { "ProductId": 103, "Number": "420", "Description": "CEMENT", "DrawNumber": 1, "UOM": "LB", "Target": 1080.0, "Actual": 0.0, "MoisturePercentage": 0.0, "AbsorptionPercentage": 0.0 }, { "ProductId": 43, "Number": "430", "Description": "Water", "DrawNumber": 1, "UOM": "GL", "Target": 5.8, "Actual": 0.0, "MoisturePercentage": 0.0, "AbsorptionPercentage": 0.0 }, { "ProductId": 75, "Number": "471", "Description": "Pozz", "DrawNumber": 1, "UOM": "FO", "Target": 8.0, "Actual": 0.0, "MoisturePercentage": 0.0, "AbsorptionPercentage": 0.0 } ], "Charges": [ { "SalesTax": 29.75, "SalesTaxRate": 7.0 }, { "SalesTax": 0.0, "SalesTaxRate": 0.0 }, { "SalesTax": 0.0, "SalesTaxRate": 0.0 } ] } |
ticketimages
GET
Retrieves all ticket image attachments for the ticket specified using "TicketId". Note this is not the same as "TicketNumber". Image data is returned as an array of strings of base64 encoded images, one image per array element. If no images have been attached to the specified ticket or the specified TicketId does not exist, an empty array is returned.
POST
This endpoint is used to add image attachments to the ticket specified by the supplied ticketId (not ticket number). Images are appended to the list of attached images for the specified ticket.
| Item | Value |
|---|
| Method | POST |
| Example URL | https://server.com/goldgate/v1/ticketimages |
| Example Request | { "AuthToken": "d03fe4c9-b13e-4b0d-b388-2346a2ab08b1", "Payload": { "TicketId": 1452, "Images": [ "SG9uZXN0IE9mZmljZXIs", "dGhlIGR3YXJmIHdhcyBvbiBmaXJl", "d2hlbiBJIGdvdCBoZXJl" ] } } |
| Example Response | { "Payload": { "Success": true } } |
closeticket
This endpoint is used to update the ticket specified by the supplied ticketId (not ticket number) with the supplied details and then mark the ticket as being completed. The AddedWaterPlant and AddedWaterJob fields are assumed to be zero if blank or missing. Signature is ignored if blank or missing, but if a value is supplied it must be a valid Base64 encoding of an image file or the close request will be rejected. If a valid signature is supplied, the Terms field must be supplied with the actual terms and conditions text displayed to the user when the signature was captured, or this endpoint will fail. The Waiver and Notes fields are optional, and if the CylinderTaken field has no value or is not supplied will default to false. The RejectLoad if supplied and set to 'true' will cause the ticket to be marked as rejected by the customer when it is closed, otherwise the load will be treated normally.
| Item | Value |
|---|
| Method | POST |
| Example URL | https://server.com/goldgate/v1/closeticket |
| Example Request | { "AuthToken": "d03fe4c9-b13e-4b0d-b388-2346a2ab08b1", "Payload": { "TicketId": 1452, "Terms": "<b>Terms and conditions</b><br>This <i>must</i> accompany any submitted signature as a record of what has been signed!", "Waiver": "<b>Damage Waiver</b><br/><i>It's not our fault!</i> Have a nice day<br><sub>Revision 2017.12.12</sub>", "Notes": "Spouse's car filled with concrete as requested by customer", "AddedWaterPlant": 8.0, "AddedWaterJob": 13.50, "MeasuredSlump": 4.75, "CylinderTaken": true, "ReturnedConcrete": 0.75, "RejectLoad": false, "Signature": "Sm9uZWwgRW5naW5lZXJpbmcsIFNpbmNlIDE5NjM=", "Images": [ "SG9uZXN0IE9mZmljZXIs", "dGhlIGR3YXJmIHdhcyBvbiBmaXJl", "d2hlbiBJIGdvdCBoZXJl" ], "EmailRecipients": [ "support@jonel.com", "rick@morty.net" ] } } |
| Example Response | { "Payload": { "Success": true } } |
customertickets
Retrieves a list of ticket summary fields for the specified customer, filtered by the supplied criteria parameters. The CustomerId parameter is required, all others are optional. The optional filter criteria fields are:
- FromDate
- ThruDate
- TicketNum
- InvoiceNum
- OrderNum
- QuoteNum
- JobNum
- PONum
- TicketClosed
If a filter criteria field is blank or not supplied, then it will not be used to filter/restrict the returned records.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/customertickets?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1&CustomerId=45&FromDate="2017-07-12"&ThruDate="2017-07-12"&TicketNum=""&InvoiceNum="17-0991"&OrderNum="57"&QuoteNum=""&JobNum="4"&PONum="4"&TicketClosed=true |
| Example Response | { "Payload": { "Tickets": [ { "TicketId": 1, "TicketNumber": "875", "TruckNumber": "101", "PlantNumber": "Valley R/M", "InvoiceNumber": ""17-0991", "OrderNumber": "57", "QuoteNumber": "1", "JobNumber": "4", "Product": "114 2000P1", "PurchaseOrderNumber": "4", "Status": "Open", "TicketState": "On Job "ShipDate": "2017-07-12 00:00:00", "Address": "1234 BEACH BLVD LA HABRA CA", "TicketQuantity": 10.0, "LoadNumber": 1, "ToJobTime": "2017-11-17 05:47:00", "OnJobTime": "2017-11-17 06:21:00", "StartUnloadTime": "2017-11-17 06:40:00", "FinishUnloadTime": "", "WaitMinutes": 11, "AttachedImageCount": 0 }, { "TicketId": 4, "TicketNumber": "878", "TruckNumber": "104", "PlantNumber": "Valley R/M", "InvoiceNumber": ""17-0991", "OrderNumber": "57", "QuoteNumber": "1", "JobNumber": "4", "Product": "114 2000P1", "PurchaseOrderNumber": "4", "Status": "Open", "TicketState": "To Job "ShipDate": "2017-07-12 00:00:00", "Address": "1234 BEACH BLVD LA HABRA CA", "TicketQuantity": 10.0, "LoadNumber": 2 "ToJobTime": "2017-11-17 05:58:00", "OnJobTime": "", "StartUnloadTime": "", "FinishUnloadTime": "", "WaitMinutes": 0, "AttachedImageCount": 2 } ] } } |
customerorders
Retrieves a list of order summary fields for the specified customer, filtered by the supplied criteria parameters. The CustomerId parameter is required, all others are optional. The optional filter criteria fields are:
If a filter criteria field is blank or not supplied, then it will not be used to filter/restrict the returned records.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/customerorders?AuthToken=d03fe4c9-b13e-4b0d-b388-2346a2ab08b1&CustomerId=45&ShipDate="2017-11-07" |
| Example Response | { "Payload": { "Orders": [ { "OrderId": 1233, "OrderNumber": "27", "OrderStatus":"To Be Shipped", "CustomerName": "RediLite Contractors", "CustomerAddress": "59222 N Eastern Blvd, Pepperville", "JobAddress":"1234 Beach Blvd", "ShipDate": "2017-11-07 00:00:00", "ProductCode": "F4F25L00", "OrderedQuantity": 325.00, "ShippedQuantity": 190.00 }, { "OrderId": 1238, "OrderNumber": "30", "OrderStatus":"Shipping", "CustomerName": "Joe Knell Engine Earring", "CustomerAddress": "508 E Walnut Ave", "JobAddress":"555 Pattern Ave", "ShipDate": "2017-11-07 00:00:00", "ProductCode": "3C40A002", "OrderedQuantity": 110.00, "ShippedQuantity": 40.00 } ] } } |
trucklocation
Sends the current GPS coordinates (in decimal format) for a specified truck to AUJS for status processing. You must supply a valid truckId and valid decimal values for lat, long, speed, and alt are optional. If speed is provided, it should be in "Meters per Second", and the option altitude value alt should be supplied in "Meters".
exporttickets
Retrieves a list of ticket detail records, filtered by the supplied date range and system type parameters.
Required Parameters:
- TicketFromDate - The date of the earliest ticket to retrieve in yyyy-mm-dd format
- TicketThruDate - The dat of the oldest ticket to retrieve in yyyy-mm-dd format
Optional parameters:
- SystemType - A list of one or more of the following system type specifiers, separated by hyphens (
-). If this parameter is not specified or is empty, concreteis assumed.
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/exporttickets?AuthToken=1a0b4100-bbf8-437e-ae42-e63464f1d08f&TicketFromDate="2018-10-10"&TicketThruDate="2018-10-11"&SystemType="concrete-aggregate" |
| Example Response | "Payload": { "Tickets": [ { "TicketId": 7, "TicketNumber": "881", "TicketDate": "2018-10-10 00:00:00", "IsVoid": false, "ConcreteVolume": 5.0, "AggregateVolume": 0.0, "TotalRevenue": 617.5, "MaterialCost": 215.31, "TimeDueOnJob": "2018-10-10 16:51:00", "TimeTicketed": "2018-10-10 06:01:00", "TimeBeginLoad": "2017-10-23 16:19:51", "TimeEndLoad": "2018-10-10 06:08:00", "TimeLeavePlant": "2018-10-10 06:11:00", "TimeArriveJob": "2018-10-10 06:25:00", "TimeBeginUnload": "2018-10-10 06:33:00", "TimeEndUnload": "2018-10-10 06:45:00", "TimeLeaveJob": "2018-10-10 07:01:00", "TimeArrivePlant": "2018-10-10 16:51:13", "PlantNumber": 1, "PlantDescription": "Valley R/M", "IsFOB": false, "DriverId": 14, "DriverNumber": "2344", "DriverDescription": "Hermosa, Rick", "IsExternalDriver": false, "DriverHomePlantNumber": 10, "TruckId": 1, "TruckNumber": "101", "IsExternalTruck": false, "TruckHomePlantNumber": 1, "CustomerOrderId": 3, "CustomerOrderNumber": 1, "CustomerId": 5, "CustomerNumber": "1000", "CustomerDescription": "Selden International", "CustomerSegmentNumber": 2, "CustomerSegmentDesc": "Residential Single Family", "CustomerCity": "Fullerton", "CustomerState": "CA", "CustomerZip": "93662", "JobId": 10, "JobNumber": 6, "JobDescription": "1234 BEACH BLVD, ROSECRANS & BEACH, LA HABRA, CA, 92832", "JobSegmentNumber": 5, "JobSegmentDescription": "Residential Single Family", "DeliveryAddress": "1234 BEACH BLVD, ROSECRANS & BEACH", "DeliveryCity": "LA HABRA", "DeliveryCounty": "", "DeliveryState": "CA", "DeliveryZip": "92832", "SalesPersonNumber": 21, "SalesPersonDescription": "Henry, Stewart", "BatchmanNumber": 9, "BatchmanDescription": "Erwin, James", "QuoteId": 18, "QuoteNumber": 103, "SystemType": "concrete" }, { "TicketId": 8, "TicketNumber": "882", "TicketDate": "2018-10-10 00:00:00", "IsVoid": false, "ConcreteVolume": 10.0, "AggregateVolume": 0.0, "TotalRevenue": 1215.1, "MaterialCost": 632.47, "TimeDueOnJob": "2018-10-10 16:57:00", "TimeTicketed": "2018-10-10 09:34:00", "TimeBeginLoad": "2017-10-23 16:19:53", "TimeEndLoad": "2018-10-10 09:40:00", "TimeLeavePlant": "2018-10-10 09:44:00", "TimeArriveJob": "2018-10-10 10:12:00", "TimeBeginUnload": "2018-10-10 10:19:00", "TimeEndUnload": "2018-10-10 10:44:00", "TimeLeaveJob": "2018-10-10 10:58:00", "TimeArrivePlant": "2018-10-10 16:53:41", "PlantNumber": 1, "PlantDescription": "Valley R/M", "IsFOB": false, "DriverId": 20, "DriverNumber": "123988", "DriverDescription": "Jimeson, Mike", "IsExternalDriver": false, "DriverHomePlantNumber": 9, "TruckId": 2, "TruckNumber": "102", "IsExternalTruck": false, "TruckHomePlantNumber": 1, "CustomerOrderId": 4, "CustomerOrderNumber": 2, "CustomerId": 8, "CustomerNumber": "1001", "CustomerDescription": "Acme Ready Mix...", "CustomerSegmentNumber": 0, "CustomerSegmentDesc": "Residential Multiple Family", "CustomerCity": "Fullerton", "CustomerState": "CA", "CustomerZip": "92832", "JobId": 42, "JobNumber": 31, "JobDescription": "4001 VICTORVILLE ROAD, SUMMIT HOMES, FULLERTON", "JobSegmentNumber": 6, "JobSegmentDescription": "Residential Multiple Family", "DeliveryAddress": "4001 VICTORVILLE ROAD, SUMMIT HOMES", "DeliveryCity": "FULLERTON", "DeliveryCounty": "", "DeliveryState": "", "DeliveryZip": "", "SalesPersonNumber": 21, "SalesPersonDescription": "Henry, Stewart", "BatchmanNumber": 9, "BatchmanDescription": "Erwin, James", "QuoteId": 9, "QuoteNumber": 72, "SystemType": "concrete" } ] } |
employeetimes
Retrieves a list of employee time clock records, filtered by the supplied date range parameters, which are required. The required filter criteria fields are:
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/employeetimes?AuthToken=1a0b4100-bbf8-437e-ae42-e63464f1d08f&WorkFromDate="2018-10-10"&WorkThruDate="2018-10-11" |
| Example Response | "Payload": { "EmployeeTimes": [ { "EmployeeTimeId": 9, "EmployeeId": 19, "WorkDate": "2018-10-11 00:00:00", "ScheduledInTime": "2018-10-11 08:00:00", "PunchInTime": "2018-10-11 08:00:00", "PunchOutTime": "2018-10-11 15:00:00", "AuthorizedFlag": false, "EmployeeTypeId": 2, "EmployeeTypeDescription": "Driver", "HomePlantId": 8, "EmployeeNumber": "36955", "LastName": "Shay", "FirstName": "David", "MiddleName": " " }, { "EmployeeTimeId": 11, "EmployeeId": 17, "WorkDate": "2018-10-11 00:00:00", "ScheduledInTime": "2018-10-11 08:00:00", "PunchInTime": "2018-10-11 08:00:00", "PunchOutTime": "2018-10-11 15:00:00", "AuthorizedFlag": false, "EmployeeTypeId": 2, "EmployeeTypeDescription": "Driver", "HomePlantId": 4, "EmployeeNumber": "3099", "LastName": "Reed", "FirstName": "Roman", "MiddleName": " " } ] }
|
orderchanges
Retrieves a list of customer order change records, filtered by the supplied system type and date range parameters, which are required. The required filter criteria fields are:
- SystemTypeId
- ChangeFromDate
- ChangeThruDate
| Item | Value |
|---|
| Method | GET |
| Example URL | https://server.com/goldgate/v1/orderchanges?AuthToken=1a0b4100-bbf8-437e-ae42-e63464f1d08f&SystemTypeId=1&ChangeFromDate="2018-07-01"&ChangeThruDate="2018-09-01" |
| Example Response | "Payload": { "OrderChanges": [ { "OrderId": 3, "ProductId": 1024, "SystemTypeId": 1, "Quantity": 125.0, "ChangedDateTime": "2018-07-23 14:49:31", "SequenceNumber": 294, "OrderNumber": 1, "ProductTypeId": 1, "ProductTypeDescription": "Concrete", "SystemTypeDescription": "Concrete", "CustomerId": 5, "CustomerNumber": "1000", "CustomerName": "Selden International" }, { "OrderId": 6, "ProductId": 1024, "SystemTypeId": 1, "Quantity": 155.0, "ChangedDateTime": "2018-08-07 10:32:20", "SequenceNumber": 306, "OrderNumber": 4, "ProductTypeId": 1, "ProductTypeDescription": "Concrete", "SystemTypeDescription": "Concrete", "CustomerId": 5, "CustomerNumber": "1000", "CustomerName": "Selden International" } ] }
|
authorizations
Retrieves a JSON Web Token (JWT) containing the permission status of the supplied Permission Tags for the specified user. Note you must provide the same credential details (ClientID and AuthInfo) for the specified user as you would supply to the logon endpoint. Only "External Users" credentials mode is supported by the authorizations endpoint, "Pre-Defined Users" mode is not supported. The following parameters are required:
- ClientId
- AuthInfo
- PermissionTags
If the specified ClientId doesn't exist or the AuthInfo isn't valid for the specified ClientId and Server, a standard error response payload is returned.
A successfull request will return a JWT with a JSON payload similar to the following:
{ "authzs": { "Goldgate": true, "LoadTrack": true }, "client": { "custid": 5, "chgpwd": true }, "iss": "server.com", "sub": "rick.sanchez@jonel.com", "exp": 1678458432
}
where the authzs object contains the boolean authorization status for one or more specified PermissionTags, separated by tilde (~) characters. Note that the client MUST validate the signature on the JWT before processing any data in the payload, and must also honor the exp expiration field (Unix Timestamp). Clients should also verify that the iss (Issuer) and sub (Subject) fields match the values expected.
History
- 2019-05-28 (V1.12.1.0): Added ShortLoadTypes to
lookups endpoint response and ShortLoadTypeId to customers endpoint response. - 2019-06-17 (V1.12.1.0): Added missing
ShortLoadTypeId to customers endpoint response. - 2019-09-16 (V1.12.5.0): Added
Strength and AggregateSize fields to ticket endpoint response. - 2020-02-24 (V1.12.7.0): On
closeticket endpoint, changed AddedWater to AddedWaterJob, added AddedWaterPlant, MeasuredSlump, & ReturnedConcrete fields to incoming data. Added ToJobDatetime & FormulaSlump fields to ticket endpoint response. - 2020-02-28 (V1.12.7.0): Added
WaterAddedJob & WaterAddedPlant fields to ticket endpoint response (original WaterAdded field now returns sum of new fields) - 2020-05-28 (V1.13.2.0): Added
EmailRecipients fields to ticket endpoint response and to closeticket endpoint request. - 2020-08-24 (V1.14.2.0): Added
UOM_Id field to Ticket.Products in ticket endpoint response. - 2020-09-02 (V1.14.2.0): Added
PlantId field to Ticket.Plant in ticket endpoint response. - 2020-09-16 (V1.15.0.0): Added
LeaveJobDatetime & ArrivePlantDatetime to ticket endpoint response. - 2020-12-04 (V1.15.1.0): Added PerHundredWeight field to Concrete.Plants.Materials in
products endpoint response. - 2021-06-03 (V1.15.3.0): Add OrderStatus and JobAddress to
customerorders endpoint response. - 2021-09-16 (V1.15.5.0): Add
StatusId and IsInactive to ticket endpoint response - 2021-10-28 (V1.15.6.0): Add
SlumpOrdered to ticket endpoint response - 2023-03-20 (V1.17.0.0): Add "External Users" mode to
logon endpoint, Add authorizations endpoint - 2023-09-15 (V1.17.0.0): Add support for aggregate tickets on
exporttickets endpoint - 2023-09-15 (V1.17.0.0): Add
TruckType and SystemType result fields to trucks endpoint - 2023-09-15 (V1.17.0.0): Add 'TruckTypes' to 'lookups' endpoint result sets
- 2023-10-04 (V1.17.1.0): Add QuoteId to
addquote response - 2024-05-07 (V1.17.7.0): Add
ProductId and Number fields to Products and Ingredients objects in the ticket endpoint result. - 2024-05-07 (V1.17.7.0): Add several new fields to
customers endpoint result. - 2024-05-15 (V1.18.0.0): Add
quotes and quote endpoints - 2024-05-29 (V1.18.0.0): Add
FormulaSlump field to quote endpoint result.