{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-products/nowinfinity/resources/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"API structure"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"api-structure","__idx":0},"children":["API structure"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This page covers how Partner API requests and responses are shaped."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"url-structure","__idx":1},"children":["URL structure"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Endpoints follow this pattern:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://{host}/v1/{resource}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Endpoint paths align with the NowInfinity platform — what is called Companies in NowInfinity is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/companies"]}," in the API, so if you know the product you can usually guess the path."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Examples"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET  /v1/accounts\nGET  /v1/documents\nGET  /v1/documents/{documentId}\nGET  /v1/documents/{documentId}/files\nGET  /v1/companies/{companyIdOrAcn}\nPOST /v1/forms/process\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/nowinfinity/resources/environments"},"children":["Environments"]}," for the host to use, and the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/nowinfinity/apis"},"children":["API reference"]}," for the full endpoint list."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"request-headers","__idx":2},"children":["Request headers"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Header"},"children":["Header"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Required. Your access token as a Bearer token: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization: Bearer {access_token}"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]}," for requests with a body."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-NI-AccountID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional. Targets a child account. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/nowinfinity/resources/child-accounts"},"children":["Accessing child accounts"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"responses","__idx":3},"children":["Responses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Successful responses return JSON. A request for a single resource returns that object; a collection endpoint returns an array."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Most resources include a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Links"]}," array alongside their data, pointing at related resources and available actions. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/nowinfinity/resources/following-links"},"children":["Following links"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"status-codes","__idx":4},"children":["Status codes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The request succeeded."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["201"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The resource was created. Creating a form returns the new document's identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Accepted, but not finished. Returned while document files are still being generated — retry later."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["204"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["No content. Returned when files have not been generated because the document is still in draft."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The request was invalid. The response body identifies which fields failed."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Authentication is missing or invalid."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The token is valid but does not grant access to this resource."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The resource does not exist, or is not visible to the account you are acting as."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/nowinfinity/resources/error-codes"},"children":["Error codes"]}," for response bodies and how to handle each case."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"asynchronous-operations","__idx":5},"children":["Asynchronous operations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some operations do not complete immediately. Generating document files is the main one: creating a form produces a draft with no files, and submitting it for processing starts generation in the background."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["That means a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]}," is a normal part of the flow rather than an error. Poll the files endpoint until it returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},", backing off between attempts rather than retrying tightly."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Processing may also pause for reasons outside the API — where manual handling or payment is required, for example — so treat generation as something that may take a while, not something that always completes in seconds."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"a-first-request","__idx":6},"children":["A first request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you have a token, the accounts endpoint is the simplest way to confirm everything works:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl https://partnerapi.nowinfinity-test.com.au/v1/accounts \\\n  -H \"Authorization: Bearer {access_token}\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," with your account in the response means your credentials, scopes and environment are all correct."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related","__idx":7},"children":["Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/nowinfinity/resources/querying-with-odata"},"children":["Querying with OData"]}," — filtering, sorting and paging."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/nowinfinity/resources/following-links"},"children":["Following links"]}," — using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Links"]}," array."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/nowinfinity/resources/child-accounts"},"children":["Accessing child accounts"]}," — the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-NI-AccountID"]}," header."]}]}]},"headings":[{"value":"API structure","id":"api-structure","depth":1},{"value":"URL structure","id":"url-structure","depth":2},{"value":"Request headers","id":"request-headers","depth":2},{"value":"Responses","id":"responses","depth":2},{"value":"Status codes","id":"status-codes","depth":2},{"value":"Asynchronous operations","id":"asynchronous-operations","depth":2},{"value":"A first request","id":"a-first-request","depth":2},{"value":"Related","id":"related","depth":2}],"frontmatter":{"title":"API structure","description":"URL structure, request headers, response formats and status codes for the NowInfinity Partner API.","seo":{"title":"API structure"}},"lastModified":"2026-10-26T06:25:05.611Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/nowinfinity/resources/api-structure","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}