{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"12d69fbc-ddb1-4eb0-a1b7-90931b873cdd","name":"Open API Description McMain Software","description":"This page provides a description of the endpoints present in the McMain Open API which can be used to communicate with the McMain Backoffice and its entities.\n\nThe McMain Open API is a [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer) API. This means that you can communicate with the API with HTTP requests. The API will respond with HTTP responses and standard [HTTP status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes). The requests and responses may contain a body, which will always be in the [JSON format](https://en.wikipedia.org/wiki/JSON).\n\n# Base URL\n\nTo make a request you start with the base URL and add a path to an endpoint.\n\n> [https://api-v1.cloud3.mcmain.online/mcwsb](https://api-v1.cloud3.mcmain.online/mcwsb) \n  \n\n# Authentication\n\nTo ensure that you are authorized to send API calls to the McMain Open API, You need to make use of Bearer authentication. This means that with each API call an Authorization header needs to be sent with the following information:\n\n```\nAuthorization: Bearer {AUTHTOKEN}\n\n ```\n\nDo not forget to put 'Bearer ' in front of your token.\n\n# Filtering\n\nIn addition to sending a JSON payload when necessary, it is also supported to send filters with your `GET` request. This can be done by using the [SCIM standard](https://en.wikipedia.org/wiki/System_for_Cross-domain_Identity_Management) as specified by [RFC7644](https://www.rfc-editor.org/rfc/rfc7644). The skeleton of such a filter is as follows:\n\n```\n?query={key} [lt,gt,ge,le,eq] [\"string\"|numeric] and  ….\n\n ```\n\n1. `{key}` should be replaced with the actual key name.\n    \n2. The first parameter is the operator that should be used for the comparison, and should be one of the [supported operators](#supported-operators).\n    \n3. The second parameter should be replaced with one or more values to filter on.\n    \n4. A third operator, `and`, can be used when more filters need to be sent, keep in mind that this **must** be in lowercase.\n    \n\nThe query parameter for fetching all Work Orders with a crew of either `ETD` or `MTD` in status `4` will then look as follows:\n\n```\n?query=woCrew eq \"ETD\"|\"MTD\" and woStat eq \"4\"\n\n ```\n\nEndpoints that support filtering will have the `Available filters` header provided in their documentation to provide information about which data can be filtered on and what key name to use.\n\n## Supported operators\n\n| **Operator** | **Description** |\n| --- | --- |\n| eq | equal |\n| gt | greater than |\n| ge | greater than or equal to |\n| lt | less than |\n| le | less than or equal to |\n\n## Sorting\n\nIn addition to filtering, it is also supported to sort results with your `GET` request in ASCENDING or DESCENDING order on individual columns. It is not necessairily possible to sort every column. The columns and their represented key that are possible to sort will be specifically mentioned for each GETLIST endpoint. By default the response will be sorted by the first column i.e. the number. The skeleton of a sort query is as follows:\n\n```\n?sort={key}:[asc|desc]\n\n ```\n\n1. `{key}` should be replaced with the actual key name.\n    \n2. `[asc|desc]` should be replaced with 'asc' or 'desc' for ascending or descending respectively\n    \n\nThe query parameter for fetching Work Orders in descending order by number will then look as follows:\n\n```\n?sort=woNmr:desc\n\n ```\n\n## Pagination\n\nBy default, the API fetches the first 1000 records. To retrieve the next 1000 records, you can use an offset to indicate the starting record you would like to fetch\n\n``` json\n{\n    \"offset\":1000\n}\n\n ```\n\n## Last Modified\n\nWhen calling a `GetDetails` or `GetList` endpoint the `If-Modified-Since` request header can be set. This ensures only records that have been modified since the given datetime are received in the response.\n\nIf you are calling a `GetDetails` or `GetList` endpoint with the `If-Modified-Since` header, the response will contain a header named `Last-Modified`. The value of this header can then be used the next time the endpoint is called in the `If-Modified-Since` header of that request.\n\nThe value for the `If-Modified-Since` header should have the following [syntax](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since#syntax):\n\n```\nIf-Modified-Since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT\n\n ```\n\nIf you are sending the first ever request to a `GetList` endpoint and you would like to use the `If-Modified-Since` header for filtering, you can use the following value:\n\n```\nWed, 01 Jan 2025 00:00:00 GMT\n\n ```\n\nWhen using the `If-Modified-Since` header in your request, the `sort` query parameter in your request will be ignored.\n\n# Responses\n\n## Status Codes\n\nHere is an overview of the different HTTP status codes you could receive in responses from the Open API and what they mean:\n\n| Code | Text | Meaning |\n| --- | --- | --- |\n| 200 | OK | Success |\n| 400 | Bad Request | The format of the body of your request is not what the API expects. Make sure to include all required fields. |\n| 401 | Unauthorized | Your token is missing or incorrect. |\n| 404 | Not Found | The endpoint or record you request does not exist. |\n| 409 | Conflict | The identifier of the sent object already exists or something unexpectedly goes wrong. |\n| 429 | Too many requests | Your API authentication token has exceeded the rate limit of 200 requests per 5 seconds, and you need to reduce your request frequency before retrying. |\n| 304 | Not Modified | No record(s) were found that were modified since the value given in the `If-Modified-Since` request header |\n\n## Error Codes\n\nIn every error message, you will receive some information about what went wrong. One of the things you will receive in the field `error_no` is an error code. Below is a table to find the meaning of some error codes. Other error codes are for internal errors and should be communicated with [support@mcmain.nl](https://mailto:support@mcmain.nl) to resolve. The specific data that caused the error will be described in the `message` or `id` field.\n\n| Code | Description |\n| --- | --- |\n| 19101 | Missing data in payload |\n| 19102 | Invalid data format in payload |\n| 19103 | Invalid data length in payload |\n| 19104 | Blank data in payload |\n| 19105 | Missing resource |\n| 19106 | Missing details section / data |\n| 19107 | Invalid tag in payload |\n| 19108 | Key value has invalid status to perform action |\n| 19109 | Key value is read-only and cannot be modified |\n| 19110 | Key value is not found |\n| 19111 | Value is out of bounds |\n| 19112 | Key value already exists |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"5511615","collectionId":"12d69fbc-ddb1-4eb0-a1b7-90931b873cdd","publishedId":"SVYjSMNw","public":true,"publicUrl":"https://api.mcmain.online","privateUrl":"https://go.postman.co/documentation/5511615-12d69fbc-ddb1-4eb0-a1b7-90931b873cdd","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.4","publishDate":"2021-07-15T13:44:27.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Open API","id":"ab908fc5-354c-4544-aa4a-fbb60f1cee13","owner":"5511615","values":[{"key":"sandbox_url","value":"https://api-v1.cloud3.mcmain.online/mcwsb","enabled":true},{"key":"bearer_token","value":"{AUTHTOKEN}","enabled":true},{"key":"apiSecret","value":"3X3bZzxmHKpsVSWPhwlLrla25mxRv5hp","enabled":true},{"key":"currentDate","value":"1585836406","enabled":true},{"key":"hash","value":"07e708bad19b90d2d8d240ee9d62d20a","enabled":true},{"key":"wsb_global","value":"https://api-v1.mcmain.online/mcwsb","enabled":true}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":"https://mcmain.online/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Open API","value":"5511615-ab908fc5-354c-4544-aa4a-fbb60f1cee13"}],"canonicalUrl":"https://api.mcmain.online/view/metadata/SVYjSMNw"}