{"title":"Using OData to Return or Obtain a JSON Document","url":"https://jonas-paprotka.de/docs/dev-itpro/webservices/return-obtain-json-document/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/return-obtain-json-document, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/return-obtain-json-document","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn about how to use OData to obtain a JSON document","date":"2024-01-28","meta":{"topic":"how-to"},"outline":[{"level":1,"title":"Using OData to Return or Obtain a JSON Document","slug":"using-odata-to-return-or-obtain-a-json-document","at":0,"chars":1535},{"level":2,"title":"Obtain a document based on JSON","slug":"obtain-a-document-based-on-json","at":148,"chars":1299},{"level":2,"title":"Related information","slug":"related-information","at":1447,"chars":88}],"text":"# Using OData to Return or Obtain a JSON Document\nYou can publish a page as a web service and consume it using JavaScript Object Notation \\(JSON\\).\n## Obtain a document based on JSON\n1. You can build applications that consume and display Business Central data using JSON. This example assumes that you have registered and published a page web service in Business Central.\n2. Start a supported web browser, such as Microsoft Edge. In the Address field, enter a URI in this format:\n ```\n https://<Server>:<WebServicePort>/<ServerInstance>/ODataV4/<web service>?$format=json\n ```\n If Business Central Server is running on the local computer and is using the default Business Central Server instance and OData port, and you have published a web service that is based on page 21 that is called Customer, then the address is:\n ```\n https://localhost:7048/BC230/ODataV4/Customer?$format=json\n ```\n This generates a text file that contains metadata and data from the web service. You can open the file from the browser, or you can save it to disk.\n> NOTE\n> The value of the format attribute must be lowercase: `?$format=json`.\nIf you want to consume the web service as JSON-P, you can add the `?$callback=<callback function name>` parameter.\nYou can use a similar URI to return the web service as an AtomPub document, in which case the attribute is `?$format=atom`. See Using OData to Return-Obtain an AtomPub Document<return-obtain-an-atompub-document>.\n## Related information\nUsing OData Web Services to Modify Data<use-odata-to-modify-data>"}