Zum Inhalt

Get masterData

Get a masterData object in Business Central.

HTTP request

Replace the URL prefix for Business Central depending on environment following the guideline.

POST {businesscentralPrefix}/v2.0/$batch

Request headers

Header Value
Authorization Bearer {token}. Required.
Content-Type application/json

Request body

In the request body, supply a JSON representation of masterDataWebCon object.

Response

If successful, this method returns 201 Created response code and a masterData object in the response body.

Example

Request

Here is an example of a request.

POST https://{businesscentralPrefix}/v2.0/$batch
Content-type: application/json

{
    "requests": [
        {
            "id": "1",
            "method": "GET",
            "url": "/tso/webconnector/v2.0/companies({{company}})/languagesWebCon",
            "headers": {
            }
        }
    ]
}

Response

Here is an example of the response.

Note

The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
    "responses": [
        {
            "id": "1",
            "status": 200,
            "headers": {
                "urls-rewritten-to-public": "false",
                "content-type": "application/json; odata.metadata=minimal; odata.streaming=true",
                "odata-version": "4.0"
            },
            "body": {
                "value": [
                    {
                        "@odata.etag": "W/\"JzIwOzE4MjA4NDkwNzk5MTU5ODQ4MjYwMTswMDsn\"",
                        "id": "6a374203-0e30-ee11-bdfc-6045bde98c16",
                        "code": "BGR",
                        "name": "Bulgarisch",
                        "windowsLanguageID": 1026
                    }
            }
    ]
}

See also

Tips for working with the APIs
masterData