### Get Contract Purchase Order by ID (cURL) Source: https://apidocs.joblogic.com/ This cURL command demonstrates how to retrieve a specific contract purchase order by its ID using a GET request. It requires the tenantId and the order ID as query parameters and includes an Authorization header for authentication. The endpoint is used to fetch details of a single contract purchase order. ```curl curl --location 'https://uatapi.joblogic.com/api/v1/ContractPurchaseOrder?tenantId=675C94B3-B82A-42B0-A16B-157A29521E79&id=11C9C214-DB4E-4151-8A93-AEB3FCD455AF' \ --header 'Authorization: Bearer {{vault:json-web-token}}' ``` -------------------------------- ### Identity Server Access Token Response Source: https://apidocs.joblogic.com/ This is an example JSON response received after successfully requesting an access token from the Joblogic Identity Server. It includes the access token, its expiration time, token type, and the granted scope. ```json { "access_token": "{{vault:json-web-token}}", "expires_in": 3600, "token_type": "Bearer", "scope": "JL.Api" } ``` -------------------------------- ### GET /api/v1/ContractPurchaseOrder Source: https://apidocs.joblogic.com/ Retrieve details for a specific Contract Purchase Order using tenant and order identifiers. ```APIDOC ## GET /api/v1/ContractPurchaseOrder ### Description Retrieve details for a specific Contract Purchase Order. ### Method GET ### Endpoint https://uatapi.joblogic.com/api/v1/ContractPurchaseOrder ### Parameters #### Query Parameters - **tenantId** (GUID) - Required - The tenant identifier. - **id** (GUID) - Required - The contract purchase order identifier. ### Request Example curl --location 'https://uatapi.joblogic.com/api/v1/ContractPurchaseOrder?tenantId=675C94B3-B82A-42B0-A16B-157A29521E79&id=11C9C214-DB4E-4151-8A93-AEB3FCD455AF' \ --header 'Authorization: Bearer {{vault:json-web-token}}' ### Response #### Success Response (200) - No response body returned. ``` -------------------------------- ### Joblogic API - Introduction Source: https://apidocs.joblogic.com/ Provides an overview of the Joblogic API and its purpose. ```APIDOC ## Joblogic API ### Description Welcome to the Joblogic Developer Platform. The Joblogic API operates as a REST API. This documentation provides a comprehensive guide on utilizing Joblogic's API. Kindly review it attentively. ### API Reference * * * Please note the tenant id and data provided throughout this document is from Joblogic's test data account. This has been included to help demonstrate examples for your understanding. ### Getting Started Guide * * * ## Setup Our API access is secured behind our firewall, to enable access to this could please supply public IP addresses that will require access. We will also create a Joblogic account on our UAT server for you to test against it, to do this we will require a contact name, email address and phone number. On receipt of the above information we will whitelist your IP’s and provide you with the necessary documentation and instructions which will allow you to connect to and develop your integration within our UAT environment. The steps below demonstrates how to gain access to the API and UAT environment. * Provide IP address and user details for access to the API and UAT environment. * Click here to find your IP address. * Provide the following details: * Contact name * Email address * Phone number * Once processed access to uat.joblogic.com will be granted. Where you will be able להי access from your IP address. * API details which will be provided: * Client ID = xxx * Client Secret = xxx * Tenant ID = xxx * Joblogic UAT test system details which will be provided: URL = https://uat.joblogic.com Username = xxx Password = xxx _The UAT Tenant that has been created for you will not have any data within it, we would suggest that you export a number of Customers / Sites / Assets from your live data so that you can import them, alternatively you can manually create items within your UAT tenant to test against._ ### Joblogic's Integration Service * * * * Requirements required for costs estimation. A 50% deposit will need to be processed for the integration to be started. * A Specification will be written on the Integration. * Customer will need to sign off the Specification. * Development takes place with QC testing. * API/ Integration is delivered to the customer. * Customer tests the integration. ``` -------------------------------- ### Authenticate with Joblogic API Source: https://apidocs.joblogic.com/ Demonstrates how to obtain an OAuth2 access token using client credentials and how to apply the resulting bearer token to the Authorization header for subsequent API requests. ```bash curl --location --request POST 'https://uatidentityserver.joblogic.com/connect/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_id=YOUR_CLIENT_ID' \ --data-urlencode 'client_secret=YOUR_CLIENT_SECRET' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'scope=JL.Api' ``` ```bash curl -H "Authorization: Bearer " https://api.joblogic.com/endpoint ``` -------------------------------- ### POST /connect/token Source: https://apidocs.joblogic.com/ Authenticates the client and retrieves an access token for subsequent API requests. ```APIDOC ## POST /connect/token ### Description Exchanges client credentials for a Bearer access token to authorize API requests. ### Method POST ### Endpoint https://uatidentityserver.joblogic.com/connect/token ### Parameters #### Request Body - **client_id** (string) - Required - The client identifier - **client_secret** (string) - Required - The client secret key - **grant_type** (string) - Required - Must be 'client_credentials' - **scope** (string) - Required - Requested access scope (e.g., 'JL.Api') ### Request Example curl --location 'https://uatidentityserver.joblogic.com/connect/token' \ --data-urlencode 'client_id=SabiaDevAPIDemo' \ --data-urlencode 'client_secret=ksjwu256jaII' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'scope=JL.Api' ### Response #### Success Response (200) - **access_token** (string) - The JWT access token - **expires_in** (integer) - Token expiration in seconds - **token_type** (string) - Type of token (Bearer) - **scope** (string) - Granted scopes #### Response Example { "access_token": "{{vault:json-web-token}}", "expires_in": 3600, "token_type": "Bearer", "scope": "JL.Api" } ``` -------------------------------- ### POST /api/v1/ContractPurchaseOrder/getall Source: https://apidocs.joblogic.com/ Retrieves a paginated list of contract purchase orders based on search criteria and filters. ```APIDOC ## POST /api/v1/ContractPurchaseOrder/getall ### Description Retrieves a list of contract purchase orders filtered by search terms and date ranges. ### Method POST ### Endpoint https://localhost:5001/api/v1/ContractPurchaseOrder/getall ### Parameters #### Request Body - **SearchTerm** (string) - Optional - Text to search within orders - **startDateRaised** (string) - Optional - Start date filter (ISO 8601) - **endDateRaised** (string) - Optional - End date filter (ISO 8601) - **PageIndex** (integer) - Required - Current page number - **PageSize** (integer) - Required - Number of items per page - **TabFilter** (integer) - Optional - Filter category ID - **TenantId** (string) - Required - Unique identifier for the tenant ### Request Example { "SearchTerm": "", "startDateRaised": "2023-04-26T10:24:21.423", "endDateRaised": null, "PageIndex": 3, "PageSize": 10, "TabFilter": 5, "TenantId": "675C94B3-B82A-42B0-A16B-157A29521E79" } ### Response #### Success Response (200) - No body returned. ``` -------------------------------- ### Joblogic API Request Models (C#) Source: https://apidocs.joblogic.com/ Defines the base request and response models for the Joblogic API, including search parameters and tenant identification. It also includes a model for note requests. ```csharp using System; using System.ComponentModel.DataAnnotations; namespace Joblogic.API.Models { public class BaseSearchApiRequest : BaseApiRequest { public string SearchTerm { get; set; } public string TagIds { get; set; } = null; public bool IncludeInactive { get; set; } = false; [Range(1, int.MaxValue, ErrorMessage = "Invalid page index (>0)")] public int PageIndex { get; set; } = 1; [Range(5, 50, ErrorMessage = "Invalid page size: 5-50 items.")] public int PageSize { get; set; } = 10; } public class BaseApiRequest { /// /// Contractor Id in Joblogic /// [Required] public Guid TenantId { get; set; } //public Dictionary Meta { get; set; } } public class BaseSearchApiResponse : BaseApiResponse { public int TotalCount { get; set; } public int PageIndex { get; set; } public int PageSize { get; set; } } public class BaseApiResponse { public const string invalid_id = "Invalid Id"; public const string invalid_tenant = "Invalid Tenant"; public const string invalid_provider = "Invalid Provider"; public const string empty_message = "Message Empty"; public const string invalid_message = "Invalid Message"; public const string header_dateTime_missing = "DateTime Missing"; public const string header_messagetype_missing = "Message Type Missing"; public const string header_deploymentnumber_missing = "Deployment number Missing"; public const string header_providercode_missing = "Provider Code Missing"; public const string job_customer_name_or_id_missing = "Customer Name or Customer Id Missing"; public const string job_site_name_or_id_missing = "Site Name or Site Id Missing"; } public class NoteRequest { public string NoteText { get; set; } public string Author { get; set; } public DateTime DateAdded { get; set; } public bool IsPrivate { get; set; } } } ``` -------------------------------- ### Joblogic API Error Handling (C#) Source: https://apidocs.joblogic.com/ Demonstrates how to handle potential exceptions when making requests to the Joblogic API using a try-catch block. It includes a switch statement to differentiate between various Joblogic error types. ```csharp try { // Use Joblogic's library to make request} catch (JoblogicException e) { switch (e.JoblogicError.Type) { case "card_error": Console.WriteLine("Code: " + e.JoblogicError.Code); Console.WriteLine("Message: " + e.JoblogicError.Message); break; case "api_connection_error": break; case "api_error": break; case "authentication_error": break; case "invalid_request_error": break; case "rate_limit_error": break; case "validation_error": break; default: // Unknown Error Type break; }} ``` -------------------------------- ### Search Contract Purchase Orders API Request Source: https://apidocs.joblogic.com/ This snippet demonstrates how to send a POST request to the /api/v1/ContractPurchaseOrder/getall endpoint to search for contract purchase orders. It includes the necessary headers and a JSON body for the request. The endpoint requires an Authorization header with a Bearer token. ```json { "SearchTerm": "", "startDateRaised": "2023-04-26T10:24:21.423", "endDateRaised": null, "PageIndex": 3, "PageSize": 10, "TabFilter":5, "TenantId": "675C94B3-B82A-42B0-A16B-157A29521E79" } ``` ```curl curl --location 'https://localhost:5001/api/v1/ContractPurchaseOrder/getall' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{vault:json-web-token}}' \ --data '{ "SearchTerm": "", "startDateRaised": "2023-04-26T10:24:21.423", "endDateRaised": null, "PageIndex": 3, "PageSize": 10, "TabFilter":5, "TenantId": "675C94B3-B82A-42B0-A16B-157A29521E79" }' ``` -------------------------------- ### API Error Handling (400 Bad Request) Source: https://apidocs.joblogic.com/ Common error scenarios returned by the API when requested resources (Customers, Jobs, Assets, etc.) do not exist. ```APIDOC ## 400 Bad Request ### Description Standard error responses returned when the requested resource ID is invalid or does not exist in the system. ### Method GET, POST, PUT, DELETE ### Parameters #### Path Parameters - **id** (Guid) - Required - The unique identifier of the resource (e.g., customerId, jobId, assetId). ### Response #### Error Response (400) - **message** (string) - A descriptive error message indicating which resource type was not found (e.g., "Customer does not exist"). ``` -------------------------------- ### POST /connect/token Source: https://apidocs.joblogic.com/ Endpoint to exchange client credentials for a Bearer access token required for all subsequent API requests. ```APIDOC ## POST /connect/token ### Description Exchanges client_id and client_secret for a JWT access token. The token is valid for a limited duration and must be used in the Authorization header of subsequent requests. ### Method POST ### Endpoint https://uatidentityserver.joblogic.com/connect/token ### Parameters #### Request Body - **client_id** (string) - Required - The unique identifier provided by Joblogic. - **client_secret** (string) - Required - The secret key provided by Joblogic. - **grant_type** (string) - Required - Must be 'client_credentials'. - **scope** (string) - Required - Must be 'JL.Api'. ### Request Example curl --location --request POST 'https://uatidentityserver.joblogic.com/connect/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_id=YOUR_ID' \ --data-urlencode 'client_secret=YOUR_SECRET' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'scope=JL.Api' ### Response #### Success Response (200) - **access_token** (string) - The JWT bearer token. - **expires_in** (integer) - Token expiration time in seconds. - **token_type** (string) - Always 'Bearer'. #### Response Example { "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjQ2QjQ1MjRG...", "expires_in": 2592000, "token_type": "Bearer", "scope": "JL.Api" } ``` -------------------------------- ### Search Subcontractor Purchase Order Line Audit Entries (JSON) Source: https://apidocs.joblogic.com/ This snippet demonstrates how to search for audit entries related to a specific subcontractor purchase order line. It requires the SubcontractorPurchaseOrderLineId and TenantId, with optional parameters for sorting and pagination. The output includes a list of audit items and total count. ```json { "SubcontractorPurchaseOrderLineId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "OrderBy": 1, "PageIndex": 1, "PageSize": 50, "StartDate": "2025-12-01T03:10:36.542Z", "EndDate": "2025-12-01T03:10:36.542Z", "TenantId": "1c477c3b-5e77-4e4e-91f2-3f9538d5b947" } ``` -------------------------------- ### Base Search API Request Model Source: https://apidocs.joblogic.com/ Standard structure for search-based API requests including pagination and filtering. ```APIDOC ## POST /search ### Description Base model for performing paginated searches across Joblogic entities. ### Request Body - **TenantId** (Guid) - Required - The Contractor Id in Joblogic. - **SearchTerm** (string) - Optional - The term to search for. - **PageIndex** (int) - Optional - Current page index (default: 1). - **PageSize** (int) - Optional - Number of items per page (range: 5-50). - **IncludeInactive** (bool) - Optional - Flag to include inactive records (default: false). ``` -------------------------------- ### Search Subcontractor Purchase Order Line Audit Entries (cURL) Source: https://apidocs.joblogic.com/ This cURL command shows how to make a POST request to the Joblogic API to search for audit entries of a subcontractor purchase order line. It includes necessary headers and a JSON payload with parameters for filtering and pagination. The endpoint is designed to return audit history within a specified date range. ```curl curl --location 'https://uatapi.joblogic.com/api/v1/Audit/SubcontractorPurchaseOrderLine/SearchAudit' \ --header 'accept: text/plain' \ --header 'Content-Type: application/json-patch+json' \ --data '{ "SubcontractorPurchaseOrderLineId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "OrderBy": 1, "PageIndex": 1, "PageSize": 50, "StartDate": "2025-12-01T03:10:36.542Z", "EndDate": "2025-12-01T03:10:36.542Z", "TenantId": "1c477c3b-5e77-4e4e-91f2-3f9538d5b947" }' ``` -------------------------------- ### Joblogic API Constants (C#) Source: https://apidocs.joblogic.com/ Defines constant values used within the Joblogic API, primarily related to authentication policies and claim types for tenant identification. ```csharp namespace Joblogic.API.Constants { public class APIConstants { public const string RequiredTenantPolicy = "RequiredTenantId"; public const string ClientTenantIdClaim = "client_TenantId"; public const string TenantIdParam = "tenantId"; } } ``` -------------------------------- ### Request Access Token API Request Source: https://apidocs.joblogic.com/ This snippet shows how to obtain an access token from the Joblogic Identity Server using a cURL command. It sends a POST request to the '/connect/token' endpoint with URL-encoded form data, including client credentials and scope. The response is a JSON object containing the access token. ```curl curl --location 'https://uatidentityserver.joblogic.com/connect/token' \ --data-urlencode 'client_id=SabiaDevAPIDemo' \ --data-urlencode 'client_secret=ksjwu256jaII' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'scope=JL.Api' ``` -------------------------------- ### Request Access Token using C# Source: https://apidocs.joblogic.com/ This C# code snippet shows how to request an access token from the Joblogic Identity Server using RestSharp. It configures the POST request with the necessary headers and form data, including client ID, client secret, grant type, and scope. The response contains the Bearer token for subsequent API calls. ```csharp using RestSharp; using System; public class Program { public static void Main() { var client = new RestClient("https://uatidentityserver.joblogic.com/connect/token"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {{vault:json-web-token}}"); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddHeader("Cookie", "ARRAffinity=2066a7e404c63322620a42f1628e14911f2753107365e17f679eda9b9d0b7b4d; ARRAffinitySameSite=2066a7e404c63322620a42f1628e14911f2753107365e17f679eda9b9d0b7b4d"); request.AddParameter("client_id", "SabiaDevAPIDemo"); request.AddParameter("client_secret", "ksjwu256jaII"); request.AddParameter("grant_type", "client_credentials"); request.AddParameter("scope", "JL.Api"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } }; ``` -------------------------------- ### POST /api/v1/Audit/SubcontractorPurchaseOrderLine/SearchAudit Source: https://apidocs.joblogic.com/ Retrieve audit history for a specific Subcontractor Purchase Order Line within a defined date range. ```APIDOC ## POST /api/v1/Audit/SubcontractorPurchaseOrderLine/SearchAudit ### Description Retrieve audit history for a specific Subcontractor Purchase Order Line within a defined date range. ### Method POST ### Endpoint https://uatapi.joblogic.com/api/v1/Audit/SubcontractorPurchaseOrderLine/SearchAudit ### Parameters #### Request Body - **SubcontractorPurchaseOrderLineId** (GUID) - Required - Unique identifier of the subcontractor purchase order line. - **OrderBy** (int) - Optional - Sorting option (1: Op Time A-Z, 2: Op Time Z-A, 3: Audit Type A-Z, 4: Audit Type Z-A). - **PageIndex** (int) - Optional - Specifies the page number (default 1). - **PageSize** (int) - Optional - Records per page (default 10, max 50). - **StartDate** (datetime) - Optional - Start of date range filter. - **EndDate** (datetime) - Optional - End of date range filter. - **TenantId** (GUID) - Required - Tenant identifier. ### Request Example { "SubcontractorPurchaseOrderLineId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "OrderBy": 1, "PageIndex": 1, "PageSize": 50, "StartDate": "2025-12-01T03:10:36.542Z", "EndDate": "2025-12-01T03:10:36.542Z", "TenantId": "1c477c3b-5e77-4e4e-91f2-3f9538d5b947" } ### Response #### Success Response (200) - **Items** (array) - List of audit entries. - **TotalCount** (int) - Total records found. - **PageIndex** (int) - Current page index. - **PageSize** (int) - Records per page. #### Response Example { "Items": [], "TotalCount": 0, "PageIndex": 1, "PageSize": 50 } ``` -------------------------------- ### Contract Purchase Order API Source: https://apidocs.joblogic.com/ API endpoint for managing Contract Purchase Orders. ```APIDOC ## POST /ContractPuchaseOrder ### Description Creates a new Contract Purchase Order. ### Method POST ### Endpoint /ContractPuchaseOrder ### Parameters #### Request Body - **field1** (type) - Required/Optional - Description of field1 ### Request Example ```json { "example": "request body for Contract Purchase Order" } ``` ### Response #### Success Response (200) - **field1** (type) - Description of field1 in success response #### Response Example ```json { "example": "response body for Contract Purchase Order" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.