{"query":"Fieldloop Batches and Receipts","corpusVersion":"local","generatedAt":"2026-11-02T05:41:51.589Z","results":[{"blockId":"public-api.fieldloop#fieldloop-batches-and-receipts","pageId":"public-api.fieldloop","title":"Fieldloop Batches and Receipts","pageTitle":"Fieldloop Batches and Receipts","url":"https://teammately.ai/docs/public-api/fieldloop.md","humanUrl":"https://teammately.ai/docs/public-api/fieldloop#fieldloop-batches-and-receipts","markdownUrl":"https://teammately.ai/docs/public-api/fieldloop.md","sectionId":"fieldloop-batches-and-receipts","kind":"api","productArea":"public_api","score":3029.5700993348296,"reasons":["search_match","title_match","display_title_match","term_match"],"markdown":"# Fieldloop Batches and Receipts"},{"blockId":"public-api.fieldloop#related-reference-pages","pageId":"public-api.fieldloop","title":"Related reference pages","pageTitle":"Fieldloop Batches and Receipts","url":"https://teammately.ai/docs/public-api/fieldloop.md","humanUrl":"https://teammately.ai/docs/public-api/fieldloop#related-reference-pages","markdownUrl":"https://teammately.ai/docs/public-api/fieldloop.md","sectionId":"related-reference-pages","kind":"api","productArea":"public_api","score":1235.3244154462066,"reasons":["search_match","page_title_match","term_match"],"markdown":"## Related reference pages\n\n{% related-card-grid %}\n- [API keys](/docs/admin-console/api-keys)\n- [Fieldloop troubleshooting](/docs/troubleshooting/fieldloop)\n{% /related-card-grid %}"},{"blockId":"public-api.fieldloop#submit-a-batch","pageId":"public-api.fieldloop","title":"Submit a batch","pageTitle":"Fieldloop Batches and Receipts","url":"https://teammately.ai/docs/public-api/fieldloop.md","humanUrl":"https://teammately.ai/docs/public-api/fieldloop#submit-a-batch","markdownUrl":"https://teammately.ai/docs/public-api/fieldloop.md","sectionId":"submit-a-batch","kind":"api","productArea":"public_api","score":1213.9334400076907,"reasons":["search_match","page_title_match","term_match"],"markdown":"## Submit a batch\n\n```http\nPOST /v1/organizations/{organizationKey}/projects/{projectId}/fieldloop/sources/{sourceId}/batches\nAuthorization: Bearer <credential from your secret mechanism>\nContent-Type: application/json\nIdempotency-Key: <application-owned logical batch key>\n```"},{"blockId":"public-api.fieldloop#example-read-a-receipt","pageId":"public-api.fieldloop","title":"Example: Read a receipt","pageTitle":"Fieldloop Batches and Receipts","url":"https://teammately.ai/docs/public-api/fieldloop.md","humanUrl":"https://teammately.ai/docs/public-api/fieldloop#example-read-a-receipt","markdownUrl":"https://teammately.ai/docs/public-api/fieldloop.md","sectionId":"example-read-a-receipt","kind":"api","productArea":"public_api","score":1112.263071729913,"reasons":["search_match","page_title_match","term_match","prefix_or_fuzzy_match"],"markdown":"### Example: Read a receipt\n\n```sh\ncurl --fail-with-body \\\n  --header \"Authorization: Bearer ${TEAMMATELY_API_KEY}\" \\\n  \"${SOURCE_URL}/batches/${BATCH_ID}\"\n```\n\n```python\nimport os\nfrom urllib.parse import quote\nfrom urllib.request import HTTPRedirectHandler, Request, build_opener\n\nclass NoRedirect(HTTPRedirectHandler):\n    def redirect_request(self, req, fp, code, msg, headers, newurl):\n        return None\n\nopener = build_opener(NoRedirect())\napi_key = os.environ[\"TEAMMATELY_API_KEY\"]\n\nurl = os.environ[\"PROJECT_URL\"] + \"/fieldloop/sources/\" + quote(os.environ[\"TEAMMATELY_FIELDLOOP_SOURCE\"], safe=\"\") + \"/batches/\" + quote(os.environ[\"BATCH_ID\"], safe=\"\")\nheaders = {\"Authorization\": \"Bearer \" + api_key}\nrequest = Request(url, headers=headers, method=\"GET\")\nwith opener.open(request) as response:\n    print(response.read().decode(\"utf-8\"))\n```\n\n```typescript\nconst apiKey = process.env.TEAMMATELY_API_KEY!;\n\n{\n  const url = new URL(process.env.PROJECT_URL! + \"/fieldloop/sources/\" + encodeURIComponent(process.env.TEAMMATELY_FIELDLOOP_SOURCE!) + \"/batches/\" + encodeURIComponent(process.env.BATCH_ID!));\n  const response = await fetch(url, {\n    method: \"GET\",\n    redirect: \"error\",\n    headers: {\n      Authorization: `Bearer ${apiKey}`,\n    },\n  });\n  if (!response.ok) throw new Error(`HTTP ${response.status}`);\n  console.log(await response.text());\n}\n```\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"io\"\n    \"log\"\n    \"net/http\"\n    \"net/url\"\n    \"os\"\n)\n\nfunc main() {\n    if err := run(context.Background()); err != nil { log.Fatal(err) }\n}\n\nfunc run(ctx context.Context) error {\n    client := &http.Client{\n        CheckRedirect: func(req *http.Request, via []*http.Request) error {\n            return http.ErrUseLastResponse\n        },\n    }\n    {\n        target := os.Getenv(\"PROJECT_URL\") + \"/fieldloop/sources/\" + url.PathEscape(os.Getenv(\"TEAMMATELY_FIELDLOOP_SOURCE\")) + \"/batches/\" + url.PathEscape(os.Getenv(\"BATCH_ID\"))\n        request, err := http.NewRequestWithContext(ctx, \"GET\", target, nil)\n        if err != nil { return err }\n        request.Header.Set(\"Authorization\", \"Bearer \" + os.Getenv(\"TEAMMATELY_API_KEY\"))\n        response, err := client.Do(request)\n        if err != nil { return err }\n        payloadBytes, readErr := io.ReadAll(response.Body)\n        response.Body.Close()\n        if readErr != nil { return readErr }\n        fmt.Println(string(payloadBytes))\n        if response.StatusCode < 200 || response.StatusCode >= 300 { return fmt.Errorf(\"HTTP %d\", response.StatusCode) }\n    }\n    return nil\n}\n```\n\n| Field | Interpretation |\n| --- | --- |\n| `batch_id`, `source_id`, `sequence` | Issued identity and destination order |\n| `status` | `uploading`, `received`, `processing`, `processed`, `failed`, `cancelled` or `deleted` |\n| `row_count` | Submitted population |\n| `accepted_count`, `duplicate_count` | Accepted records and recognized duplicates |\n| `conflict_count`, `rejected_count` | Rows requiring inspection |\n| `rows`, `safe_error_code` | Per-row outcomes and error code when returned |\n\n`processed` can include rejected/conflicting rows. Polling reads an existing batch rather than submitting another one."},{"blockId":"public-api.fieldloop#read-the-receipt","pageId":"public-api.fieldloop","title":"Read the receipt","pageTitle":"Fieldloop Batches and Receipts","url":"https://teammately.ai/docs/public-api/fieldloop.md","humanUrl":"https://teammately.ai/docs/public-api/fieldloop#read-the-receipt","markdownUrl":"https://teammately.ai/docs/public-api/fieldloop.md","sectionId":"read-the-receipt","kind":"api","productArea":"public_api","score":1065.0771218293792,"reasons":["search_match","page_title_match","term_match","prefix_or_fuzzy_match"],"markdown":"## Read the receipt\n\n`202` acknowledges durable receipt of the bytes. Retain `data.batch_id`:"},{"blockId":"public-api.fieldloop#definition","pageId":"public-api.fieldloop","title":"Definition","pageTitle":"Fieldloop Batches and Receipts","url":"https://teammately.ai/docs/public-api/fieldloop.md","humanUrl":"https://teammately.ai/docs/public-api/fieldloop#definition","markdownUrl":"https://teammately.ai/docs/public-api/fieldloop.md","sectionId":"definition","kind":"api","productArea":"public_api","score":1043.9467343453593,"reasons":["search_match","page_title_match","term_match","prefix_or_fuzzy_match"],"markdown":"## Definition\n\nSubmit captured application records to an existing source with a Fieldloop Submission key from **Admin → API Keys**. New keys carry that capability across the workspace. Configure the intended Project/source; older key restrictions and current permissions remain enforced. Receipt reads belong to the original submitter."},{"blockId":"public-api.endpoints#cases-and-fieldloop","pageId":"public-api.endpoints","title":"Cases and Fieldloop","pageTitle":"API Endpoint Reference","url":"https://teammately.ai/docs/public-api/endpoints.md","humanUrl":"https://teammately.ai/docs/public-api/endpoints#cases-and-fieldloop","markdownUrl":"https://teammately.ai/docs/public-api/endpoints.md","sectionId":"cases-and-fieldloop","kind":"api","productArea":"public_api","score":937.4162682711203,"reasons":["search_match","term_match","prefix_or_fuzzy_match"],"markdown":"## Cases and Fieldloop\n\n| Method | Path | Guide |\n| --- | --- | --- |\n| `GET` | `/cases`, `/cases/{caseId}` | [Case reads](/docs/public-api/cases) |\n| `PUT` | `/cases/{caseId}/reference-result` | [Reference responses](/docs/public-api/cases#write-a-reference-response) |\n| `POST` | `/cases/reference-results` | Batch reference responses |\n| `POST` | `/cases/imports` | [Multipart imports](/docs/public-api/case-imports) |\n| `GET` | `/cases/imports/{importId}` | Import status |\n| `POST` | `/fieldloop/sources/{sourceId}/batches` | [Fieldloop submission](/docs/public-api/fieldloop) |\n| `GET` | `/fieldloop/sources/{sourceId}/batches/{batchId}` | Fieldloop receipt |\n\nCase imports and batch reference writes reject repeated idempotency keys rather than replaying receipts. Use their [specific recovery rules](/docs/public-api/conventions#recover-without-duplicating-work)."},{"blockId":"public-api.fieldloop#recovery-and-inspection","pageId":"public-api.fieldloop","title":"Recovery and inspection","pageTitle":"Fieldloop Batches and Receipts","url":"https://teammately.ai/docs/public-api/fieldloop.md","humanUrl":"https://teammately.ai/docs/public-api/fieldloop#recovery-and-inspection","markdownUrl":"https://teammately.ai/docs/public-api/fieldloop.md","sectionId":"recovery-and-inspection","kind":"api","productArea":"public_api","score":917.5917042068269,"reasons":["search_match","page_title_match","term_match","prefix_or_fuzzy_match"],"markdown":"## Recovery and inspection\n\nReplay a lost response with identical bytes/key. Retain source records until admission is known. Inspect **Fieldloop → Logs** for original content and processing state. Source consent, Threads and Case creation are separate workflows.\n\n[SDK guides](/docs/sdks) cover continuous ingestion. `FieldloopBatch`, `FieldloopLog` and `FieldloopReceiptEnvelope` in the [OpenAPI](https://api.teammately.ai/v1/openapi.yaml) define request/receipt fields."}]}