{ "type": "https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED", "title": "Unprocessable Entity", "status": 422, "code": "BULK_RECORDS_REJECTED", "detail": "1 of the submitted records are invalid; nothing was written.", "errors": [ { "source_row_index": 0, "client_row_id": "ALB-2026-09-0001", "error_code": "REFERENCE_NOT_FOUND", "error_params": { "field": "waste_ler_code_id", "value": "0f0e0d0c-0000-4000-8000-000000000000" } } ], "rejected": 1, "request_id": "b2248a31-0f1b-4a7d-83ce-b29bd5977b4c"}
{ "dry_run": true, "submitted": 1, "valid": 1}
Create wastes: one, or up to 5,000 in a single request. The records are validated and stored at once, and their CO2e
emissions are calculated asynchronously by a background worker. The response is an ingest job (see
how bulk ingestion works), not the wastes themselves: follow it with
GET /v2/ingest-jobs/{id}, or, for a job submitted with an API key, let the
ingest_job.finished webhook tell you when it ends, and read the per-record
outcomes.
Beta. This endpoint is in beta: the contract may still change before general availability. Pin your
integration to the fields documented here and handle unknown fields in responses gracefully. Feedback is welcome
through your Dcycle contact.
{ "type": "https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED", "title": "Unprocessable Entity", "status": 422, "code": "BULK_RECORDS_REJECTED", "detail": "1 of the submitted records are invalid; nothing was written.", "errors": [ { "source_row_index": 0, "client_row_id": "ALB-2026-09-0001", "error_code": "REFERENCE_NOT_FOUND", "error_params": { "field": "waste_ler_code_id", "value": "0f0e0d0c-0000-4000-8000-000000000000" } } ], "rejected": 1, "request_id": "b2248a31-0f1b-4a7d-83ce-b29bd5977b4c"}
{ "dry_run": true, "submitted": 1, "valid": 1}
What is a waste
A waste is a quantity of residue that one of your facilities generates and hands over to a manager, who
transports it to a treatment plant. Both steps emit greenhouse gases:
Treatment: landfilling, incineration, recycling, composting… Each treatment of each type of waste has its own
emission factor.
Transport to the waste center: calculated from total_km_to_waste_center. It is optional: a waste sent
without a distance has no transport emissions (see How the emissions are calculated).
These emissions are reported under Scope 3, Category 5 (waste generated in operations) of the
GHG Protocol.A waste record is characterized by:
What
Field
Notes
Where it was generated
facility_percentages
Each facility inside your perimeter and its share. A whole waste of one facility is [{facility_id, percentage: 1}].
When
start_date, end_date
The period the waste belongs to, usually that of a collection by the waste manager. A collection with a single date sends it as both start_date and end_date.
How much
base_quantity, unit_id
In kilograms or tonnes, e.g. 1,250.5 kg, or 1.25 t for 1,250 kg. In tonnes, up to 3 decimals (1 kg); send a finer quantity in kilograms. Another unit needs your own emission factor in that unit (see unit_id).
What type of waste
waste_ler_code_id
The LER code (European List of Waste, Commission Decision 2000/532/EC): six digits with no spaces, e.g. 150106 mixed packaging; a trailing asterisk marks hazardous waste (130205*).
How it is treated
waste_rd_code_id
The R/D code: a recovery (R…) or disposal (D…) operation from Annexes I and II of the Waste Framework Directive 2008/98/EC, plus R14 (preparation for reuse), written with two digits as the catalog returns it. E.g. R03 recycling of organic substances, D01 landfill. List R/D Codes has the ones Dcycle accepts.
Who manages it
provider_name, transporter_name, destination
The waste manager, the carrier and the treatment plant.
How the emissions are calculated
Emissions are the quantity multiplied by an emission factor. What you send determines how Dcycle finds that
factor. Only when you bring your own factor do you choose it.
LER code (and R/D code when you have it): the standard route. The codes classify the waste in a common
terminology, and Dcycle looks up the factor mapped to that LER + R/D pair in its emission factor databases: DEFRA
by default, OCCC when DEFRA does not cover the code. With the LER code alone, Dcycle uses DEFRA’s landfill factor
for its material (its combustion factor where DEFRA publishes no landfill one), the conservative choice when the
treatment is unknown, or, for a code DEFRA does not cover, OCCC’s average across treatments for its waste
fraction. A recovery treatment usually has a lower factor, so send the R/D code whenever you know it.
No codes, only a description: Dcycle compares the description with the factors of its maintained emission
factor databases and selects the closest one for each year of the waste period. No LER or R/D code is assigned to
the record. A low-confidence match is still applied and counts; the waste is flagged so someone confirms the
factor. Use it when your source data has no LER code.
Your own factor, custom_ef_record_id: the only route where you choose the factor. The id of a
custom emission factor record you created beforehand in a custom
emission factor database of your organization, with wastes among its activity categories. Use it when you have a
factor measured or provided by your waste manager. No LER code is needed; if you send one as well, your factor
takes precedence. See Create Custom Record.
A record needs at least one of the three. If Dcycle cannot find a factor (the code pair is not covered, or no factor
can be applied from the description), the waste is still stored and its calculation ends as CALCULATION_FAILED in
the job’s items.Each year of the waste period is priced with that year’s edition of the database, or with its latest edition for a
year it has no edition of. A period that spans several years is split between them in proportion to its days.Transport to the waste center is calculated only when total_km_to_waste_center is greater than 0. A waste in a
weight unit is priced in tonne-kilometres (its quantity in tonnes × the distance); a waste in a volume (m3), per
vehicle-kilometre. The freight factor is DEFRA’s heavy goods vehicle factor by default; another source, such as
ecoinvent, is chosen in the Dcycle app, in the emission factors panel.
Sent with a description? A factor applied with low confidence counts like any other: the waste ends
uploaded, with its emissions and LOW_CONFIDENCE_WASTE_FACTOR_MATCH in error_messages
(GET /v1/wastes/{waste_id}/detail), and its job item is succeeded. Confirm the
factor in the Dcycle app. When no factor could be applied, the waste stays status: "review", without emissions
until someone picks a factor in the app, and its job item is failed with CALCULATION_FAILED. A description that
names a material but no treatment is calculated with the database’s default treatment for that material, with
WASTE_DEFAULT_TREATMENT_ASSUMED in error_messages. To calculate the real treatment, name it in the description
(e.g. “recycling”, “landfill”) or send the LER code with its R/D code (waste_ler_code_id and waste_rd_code_id):
an R/D code without a LER code is not used.
Find the ids you send
A record does not carry your own codes: every reference is a Dcycle id (UUID). Look them up once and keep the
mapping on your side; the catalogs rarely change. The ids of the LER, R/D and unit catalogs are the same in every
Dcycle environment, so the ones in these examples work as they are.
Field
Where to find it
facility_percentages[].facility_id
GET /v1/facilities: the facilities of your organization; add consolidate_group=true to include those of its subsidiaries.
unit_id
Kilograms 61743a63-ff70-459c-9567-5eee8f7dfd5c or tonnes cab66828-c2b1-431b-92af-f9ab37149d3c, the units GET /v2/units?type=wastes lists. Any other unit needs a custom_ef_record_id whose factor is per that unit; a per-m3 factor takes m3 only.
You send a list of records (records), one object per waste.
All or nothing: every record is validated. If any record is invalid, the whole request is rejected with
422 BULK_RECORDS_REJECTED and nothing is written: rejected is the number of invalid records and errors
lists them (up to 100). Fix them and resend the full batch.
If every record is valid, all wastes are written in one transaction and the API answers 202 Accepted with the
ingest job and a Location header pointing at it.
When every chunk is done, a job submitted with an API key also sends
ingest_job.finished to your webhook endpoints, so you can wait for it instead
of polling. (A batch sent by someone signed in to Dcycle notifies them in the app instead.)
One waste or many
The same request creates one waste or a whole batch. To create a single waste, send records with one element; it
goes through the same validation, the same job and the same calculation as a batch. For more than 5,000 records,
split them into several requests (see Limits).
Request
Headers
string
required
Your API key (see Authentication).Example:${DCYCLE_API_KEY}
string
required
UUID of the organization the wastes are created for: in Dcycle, Company settings → Organization info, click
Copy organization ID (Get an API Key). Every facility of its
perimeter (the organization and its accepted, enabled
subsidiaries) is a valid destination.Example:a8315ef3-dd50-43f8-b7ce-d839e68d51fa
string
required
Must be application/json
string
required
1 to 255 characters. Send one key per batch (a UUID works well); it is looked up per organization across every v2
bulk route (wastes, facilities, invoices…). Within 24 hours, the same key with the same route and body returns
that same job (with Idempotent-Replayed: true) instead of creating the wastes again, so a timeout or network
error can be retried safely. The same key with a different body or on another route is rejected with
422 IDEMPOTENCY_KEY_REUSED: use a new key for a new batch. A retry that arrives while the first request is still
being processed gets 409 IDEMPOTENCY_KEY_IN_PROGRESS. After 24 hours the key is free and a request with it is a
new one, so retry within that window. See
The Idempotency-Key.Example:c41d8e77-5d40-4a11-9e8b-2c9f4d1e7a03
Query Parameters
boolean
default:"false"
Validate only. The record checks run without writing: an invalid batch answers the same 422, nothing is
written and no job is created; a valid batch answers 200 with {"dry_run": true, "submitted": n, "valid": n}.
Use it to test an integration without creating data. The Idempotency-Key header is still required, but a dry
run does not check or store it, so you can send the real request with the same key afterwards. See
Dry run.
Body Parameters
array[object]
required
The wastes to create: between 1 and 5,000 objects. Each record has the fields below; a field it does not
declare (a typo, or facility_id) rejects the record with SCHEMA_INVALID.
Show record fields
array[object]
required
The facilities the waste belongs to and each one’s share, as in invoices v2.
One waste is created per entry, with quantity = base_quantity × percentage; each waste’s quantity is
stored with 3 decimals (2 t at 0.3333 gives 0.667 t). A whole waste of one facility is [{facility_id, percentage: 1}]. Each
facility once, all inside your perimeter, and the percentages add up to 1 at most; under 1,
the rest of the waste is not counted. Facility ids come from
GET /v1/facilities.
Show entry fields (only these two)
uuid
required
UUID of the facility receiving this share.
number
required
Fraction of the quantity, greater than 0 and at most 1.Example:0.6
Waste identification name or invoice/delivery-note number.Example:"ALB-2026-09-0001"
date
required
Start of the waste period (ISO 8601), from 1970 to tomorrow in UTC at the latest. Send the period of each collection by the
waste manager as your data has it; a collection with a single date sends it as both start_date and
end_date. A period that spans several years is split between them in proportion to its days.Example:"2026-09-01"
Quantity of waste in unit_id. Must be greater than 0. It is stored with 3 decimals. In tonnes, send at most 3
(0.001 t is 1 kg): a finer quantity, such as 1.2505 t, rejects the record with TOO_MANY_DECIMALS; send it in
kilograms instead (1,250.5 kg). Floating-point noise, such as 0.21000000000000002 t, is taken as 0.21 t. In any
other unit, a finer quantity is rounded to 3 decimals (to the gram in kilograms).Example:1250.5
uuid
required
Kilograms 61743a63-ff70-459c-9567-5eee8f7dfd5c or tonnes cab66828-c2b1-431b-92af-f9ab37149d3c, the units
GET /v2/units?type=wastes lists. A quantity in a unit other than that of the
emission factor applied (per tonne in DEFRA, the default database) is converted to it, and the calculation detail
in the app shows that step. Any unit other than kilograms or tonnes is supported only with your own emission
factor: a waste
priced with a custom_ef_record_id may use the unit of that record, the one its factor is per; when that unit
is not a weight (m3), only it, since kilograms and tonnes cannot be converted to it. The Dcycle app offers custom factors for
wastes per kilogram or per cubic metre (GET /v2/units?type=custom_emission_factors_wastes):
send a volume in m3 (litres ÷1,000) with a per-m3 factor. A custom factor in another unit works the same way: a
weight unit lets the waste use kilograms, tonnes or that unit, and any other unit only itself. A record without
a unit is rejected with SCHEMA_INVALID, and one with any other unit with UNIT_NOT_SUPPORTED.Example:"61743a63-ff70-459c-9567-5eee8f7dfd5c"
uuid
UUID of the LER (European List of Waste) code, taken from
GET /v1/wastes/ler-codes. Required unless you send a custom_ef_record_id,
or a non-empty description (then the description is matched to a waste type automatically before the
calculation).Example:"33d3e986-2e02-4aaa-8be0-708c143c02d9" (150106, mixed packaging)
uuid
UUID of the R/D (recovery/disposal) treatment code, taken from
GET /v1/wastes/rd-codes?ler_code_id=…, which lists the treatments with an
emission factor for that LER code. Optional, but send it when you know the treatment: without it Dcycle prices
the waste with a conservative default factor (see How the emissions are calculated).Example:"6617caab-9db0-40df-8716-54d8c94e8056" (R03)
string
default:""
Description of the waste. Required (non-empty) when waste_ler_code_id is omitted.Example:"Mezcla de envases ligeros"
string
default:""
Waste destination or treatment facility.Example:"Centro de tratamiento Ecoveza"
string | null
Business name of the waste manager that treats the waste.Example:"Ecoveza S.L."
string | null
Business name of the carrier that takes the waste to the treatment plant, when it is not the waste manager.Example:"Transportes Levante S.L."
number
default:"0"
Distance to the waste center in km, used to calculate collection transport emissions. Optional: with 0, the
default, the waste has no transport emissions. How the distance is priced is in
How the emissions are calculated. From 0 to 500,000.Example:42
uuid | null
UUID of one of your custom emission factor records, to
calculate this waste with your own factor instead of the standard databases. The record must be visible to the organization of the first facility in
facility_percentages (the one that owns the waste), enabled, and configured for the wastes activity category. With it, waste_ler_code_id is optional. In a
split (facility_percentages), every resulting waste uses the same factor.Example:"c3d4e5f6-a7b8-9012-cdef-ab3456789012"
string | null
URL of a supporting document (e.g. a waste manifest), or the document itself as a base64 data URI
(data:<mime>;base64,...), which is uploaded and stored as a URL. A data URI that is not valid base64 rejects
the record with SCHEMA_INVALID.
string | null
Original name of the attached document (e.g. manifest.xlsx), up to 255 characters.
uuid | null
UUID of a file of your files to attach as the supporting document, instead of
sending it inline in file_url: upload it first (POST /v1/files/presigned-urls with skip_processing: true so it is
stored without being read, the upload, then PATCH /v1/files/batch-update to uploaded). The waste stores the file’s URL and its name with extension as file_url and file_name (both
sent are ignored). The file must be uploaded and belong to your organization or one you can write to; any
other id rejects the record with REFERENCE_NOT_FOUND (field: "file_id"). Sent together with a data URI in
file_url, the record is rejected with SCHEMA_INVALID. In a split, every resulting waste links the same file.Example:"7c9e6679-7425-40de-944b-e07fc1f90ae7"
uuid | null
UUID of a file of your files to attach to the waste as its supporting document
(e.g. the waste manifest), uploaded as for file_id. Unlike file_id, the waste keeps it apart from the file it
was read from, and reads it back in attachment of Get Waste. The file must be
uploaded and belong to your organization or one you can write to, and a private file only to the organization
of every facility; any other id rejects the record with REFERENCE_NOT_FOUND (field: "attachment_file_id"). In
a split, every resulting waste takes it.Example:"7c9e6679-7425-40de-944b-e07fc1f90ae7"
string | null
Your own identifier for the record, up to 255 characters. It is echoed on every outcome for this record (in
rejections and in the job’s items), so you can correlate results without tracking array positions.Example:"ALB-2026-09-0001"
Response
202 Accepted
Every record passed validation and was stored. The body is the ingest job; the Location header holds its path.
processing right after the request. See Job status.
string
Always wastes for this endpoint.
string
Always create.
string
api_bulk when sent with an API key; app when sent by a person signed in to Dcycle (e.g. the app’s waste form).
object
Show fields
integer
Records in the request. All of them were stored.
integer
Records whose emissions have been calculated.
integer
Records whose calculation failed. The waste exists but has no emissions; the job’s items say which ones.
integer
Number of calculation chunks (100 records each).
integer
Chunks already calculated. chunks_done / chunks_total is the job’s progress.
datetime
When the job was created (UTC).
datetime | null
When the last chunk finished (UTC), null while the job is processing.
object
self: the job. items: its per-record outcomes.
Job status
status
Meaning
processing
Wastes are stored; emissions are being calculated.
completed
Every record was calculated.
completed_with_errors
Every chunk ran, and at least one record failed to calculate (counts.failed > 0). The other records are calculated normally.
While a job is processing, the new wastes already exist without emissions (co2e is null); the value is filled in
when their chunk is calculated. Each record’s waste id is its entity_id in the
job’s items.
If chunks_done stops moving, see A job that does not finish:
never resend the batch with a new Idempotency-Key, because its wastes are already stored.
Why a record failed to calculate
A failed item carries error_code: CALCULATION_FAILED with error_params: null. For the reason, read the waste
with GET /v1/wastes/{waste_id}/detail:
status: "error": no emission factor covers its LER/R/D pair. A pair missing from
GET /v1/wastes/rd-codes?ler_code_id=… never has one; a listed pair usually does.
status: "review": it came with a description that matched no factor. It has no emissions until someone picks
the factor in Dcycle.
Errors
Errors follow RFC 9457 problem details (Content-Type: application/problem+json): a stable
code, a human detail, errors when there is a list of problems, and the request_id to quote to support.
422 BULK_RECORDS_REJECTED — invalid records
At least one record is invalid. Nothing was written.rejected is the number of invalid records and errors
lists them (up to 100) in submission order, each with its position in records (source_row_index, starting at 0),
your client_row_id and a stable error_code.Each record carries oneerror_code: the first rule it breaks. A record with two problems shows the second one
only after you fix the first, so validate again with ?dry_run=true before sending the batch. (SCHEMA_INVALID is
the exception inside a record: its error_params.errors lists all of the record’s schema problems, up to 10.)
The record does not match the record schema: a missing required field (unit_id and facility_percentages included), a field the record or one of its facility_percentages entries does not declare (extra_forbidden, e.g. a typo, facility_id, or organization_id in an entry), a wrong type, base_quantity ≤ 0, a date outside 1970 to next year (activity_date_out_of_range), a date after tomorrow in UTC (date_in_the_future), end_date before start_date, or the record is not a JSON object. error_params.errors lists each problem with its field (loc; empty when the problem spans fields, as with end_date before start_date).
Correct the listed fields.
FACILITIES_MUST_BE_UNIQUE
A facility appears twice in facility_percentages.
List each facility once.
REFERENCE_NOT_FOUND
An id the record references does not exist or is outside your perimeter: a facility (error_params.field is facility_id; a disabled facility too), waste_ler_code_id or waste_rd_code_id; or a file_id or attachment_file_id that is not an uploaded file you can attach to every facility’s organization. Both cases answer the same, so ids cannot be probed.
Use an enabled facility of your organization or of one of its accepted, enabled subsidiaries, and take the codes from LER codes and R/D codes.
FACILITY_PERCENTAGES_INVALID
The facility_percentages add up to more than 1 (beyond 0.0001).
Make them add up to 1 or less.
WASTE_LER_OR_DESCRIPTION_REQUIRED
None of waste_ler_code_id, custom_ef_record_id or a non-empty description was sent.
Send one of them.
UNIT_NOT_SUPPORTED
unit_id is neither kilograms, tonnes nor the unit of the record’s custom_ef_record_id, or, with a per-m3 factor, not m3. error_params.supported lists the accepted unit ids.
Send the quantity in one of the units of error_params.supported: kilograms (61743a63-ff70-459c-9567-5eee8f7dfd5c) or tonnes (cab66828-c2b1-431b-92af-f9ab37149d3c), or m3 with a per-m3 factor. For another unit, price the waste with a custom_ef_record_id whose factor is per that unit.
TOO_MANY_DECIMALS
base_quantity is in tonnes with more than 3 decimals, a precision finer than 1 kg. Floating-point noise in the last digits does not count: 0.21000000000000002 t is taken as 0.21 t. error_params has the field (base_quantity), the value sent and max_decimals (3).
Send the quantity in kilograms (61743a63-ff70-459c-9567-5eee8f7dfd5c): 1.2505 t is 1,250.5 kg.
MULTIDB_CUSTOM_RECORD_NOT_FOUND_OR_DISABLED
custom_ef_record_id does not exist, is disabled, or is not visible to the organization of the first facility in facility_percentages.
Use an enabled record of that organization (or shared with it).
MULTIDB_CUSTOM_RECORD_INCOMPATIBLE_CATEGORY
The custom emission factor record is not configured for the wastes activity category.
Add wastes to the record’s activity categories.
422 IDEMPOTENCY_KEY_REUSED
The Idempotency-Key was used in this organization in the last 24 hours with a different body or on another route.
Nothing is written. Send a new key for a new batch; to retry the original batch, resend exactly the same body to the
same route (field order does not matter).
{ "type": "https://code.dcycle.io/api-reference/errors#IDEMPOTENCY_KEY_REUSED", "title": "Unprocessable Entity", "status": 422, "code": "IDEMPOTENCY_KEY_REUSED", "detail": "This Idempotency-Key was already used with a different request body or on another route. Use a new key per batch.", "request_id": "b2248a31-0f1b-4a7d-83ce-b29bd5977b4c"}
409 IDEMPOTENCY_KEY_IN_PROGRESS
Another request with the same Idempotency-Key was still being processed, typically your own retry after a timeout.
This request wrote nothing. Wait the Retry-After seconds and retry with the same key and body: you get the job of
the request that went through. See IDEMPOTENCY_KEY_IN_PROGRESS.
422 REQUEST_VALIDATION_FAILED — malformed request
The request itself is invalid: the Idempotency-Key header is missing, or records is missing, empty or has more
than 5,000 entries. errors lists each problem with where it is (loc):
Before the records are looked at, the API key and the organization are checked. Each code has its section in
Errors:
401: no API key (AUTHENTICATION_REQUIRED), a wrong or revoked one (INVALID_API_KEY), an expired one
(API_KEY_EXPIRED), a key of another organization (API_KEY_ORG_MISMATCH) or one too old to have an owner
(API_KEY_NO_OWNER).
400 ORGANIZATION_ID_REQUIRED: no x-organization-id.
403: the key’s creator is not a member of the organization in x-organization-id (LOGGED_USER_NOT_MEMBER),
the key is read-only (API_KEY_SCOPE_DENIED), or its creator is a Viewer (VIEWER_CANNOT_WRITE).
429 TOO_MANY_REQUESTS
The API key, or its IP, sent more requests than the rate limits allow. Nothing was
written: wait the Retry-After seconds and send the same request again, with the same Idempotency-Key. See
TOO_MANY_REQUESTS.
This creates two wastes (60 and 40 units) sharing one source_invoice_id, the id of the first one, as
List Wastes and Get Waste return it. The job has one
item for the record, whose entity_id is the first waste of the group.
Each share is a waste of its own: deleting that entity_id removes only the
first share (Delete Wastes shows how to find every share). If
your integration may need to delete or replace the record later, send one record per facility with that
facility’s quantity ([{facility_id, percentage: 1}]), so every waste has its own item and id.
Retries and idempotency
Network error or timeout: retry within 24 hours with the sameIdempotency-Key and body. If the first
request was accepted, you get the same job back and no wastes are duplicated.
422 BULK_RECORDS_REJECTED: nothing was stored. Fix the records and send the batch again (a new key is fine,
since the first request created nothing).
422 IDEMPOTENCY_KEY_REUSED: the key already belongs to another batch. Use a new key, or resend the original
body unchanged.
409 IDEMPOTENCY_KEY_IN_PROGRESS: the first request with that key is still being processed. Wait Retry-After
seconds and retry with the same key and body.
429 TOO_MANY_REQUESTS: nothing was written. Wait Retry-After seconds and resend with the same key and body.
Limits
Limit
Value
Records per request
1 to 5,000
Related Endpoints
Get Ingest Job
Status and progress of the batch
List Ingest Job Items
Per-record outcomes, including calculation failures
Webhooks
Be told when the job finishes instead of polling
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Dcycle Platform Docs","colors":{"primary":"#006ad4","light":"#006ad4","dark":"#006ad4"},"favicon":"https://mintcdn.com/dcyleio/3p55kB8fgLjSeubO/images/favicon.svg?fit=max\u0026auto=format\u0026n=3p55kB8fgLjSeubO\u0026q=85\u0026s=b60bb57384c71b7a5a59fbc458538887","api":{"params":{"expanded":"all"},"playground":{"display":"interactive","proxy":true},"examples":{"languages":["javascript","python","curl"],"prefill":true},"mdx":{"server":"https://api.dcycle.io"}},"navbar":{"links":[{"href":"https://app.dcycle.io","label":"App"}],"primary":{"type":"button","label":"Get API Key","href":"/docs/authentication#get-an-api-key"}},"search":{"prompt":"Search API endpoints and guides..."},"seo":{"indexing":"all"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":false},"contextual":{"options":["copy","view","claude","chatgpt"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dcyleio","hasAudioNarration":false,"actualSubdomain":"dcyleio","customDomains":["code.dcycle.io"],"gitSource":{"type":"github","owner":"dcycle-by-wum","repo":"dcycle-backend-app","deployBranch":"main","contentDirectory":"docs/developer-center","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af6ef5ebd8b0362cdeca329","clientVersion":"0.0.4128","searchFilterCounts":[{"language":"default","tag":"API","count":455},{"language":"default","tag":"Guides","count":48},{"language":"default","tag":"CLI","count":40},{"language":"default","tag":"Employees","count":38},{"language":"default","tag":"Vehicles","count":38},{"language":"default","tag":"Own Workforce","count":37},{"language":"default","tag":"Logistics","count":34},{"language":"default","tag":"Custom KPI","count":33},{"language":"default","tag":"Commands","count":33},{"language":"default","tag":"MCP","count":32}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/wastes/create-v2","slug":"/api-reference/wastes/create-v2","pageMetadata":{"title":"Create Wastes (v2)","api":"POST /v2/wastes","description":"Create one or up to 5,000 wastes in one request; emissions are calculated asynchronously and tracked through an ingest job","tag":"BETA","href":"/api-reference/wastes/create-v2"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create one or up to 5,000 wastes in one request; emissions are calculated asynchronously and tracked through an ingest job\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Expandable,Heading,Mermaid,Note,ParamField,ResponseField,Table,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create wastes: one, or up to 5,000 in a single request. The records are validated and stored at once, and their CO2e\nemissions are calculated `,_jsx(_components.strong,{children:`asynchronously`}),` by a background worker. The response is an `,_jsx(_components.strong,{children:`ingest job`}),` (see\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview`,children:`how bulk ingestion works`}),`), not the wastes themselves: follow it with\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{id}`})}),`, or, for a job submitted with an API key, let the\n`,_jsx(_components.a,{href:`/api-reference/webhooks/overview`,children:_jsx(_components.code,{children:`ingest_job.finished`})}),` webhook tell you when it ends, and read the per-record\noutcomes.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Beta.`}),` This endpoint is in beta: the contract may still change before general availability. Pin your\nintegration to the fields documented here and handle unknown fields in responses gracefully. Feedback is welcome\nthrough your Dcycle contact.`]})}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`what-is-a-waste`,children:`What is a waste`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`waste`}),` is a quantity of residue that one of your facilities generates and hands over to a manager, who\ntransports it to a treatment plant. Both steps emit greenhouse gases:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Treatment:`}),` landfilling, incineration, recycling, composting… Each treatment of each type of waste has its own\nemission factor.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Transport`}),` to the waste center: calculated from `,_jsx(_components.code,{children:`total_km_to_waste_center`}),`. It is optional: a waste sent\nwithout a distance has no transport emissions (see `,_jsx(_components.a,{href:`#how-the-emissions-are-calculated`,children:`How the emissions are calculated`}),`).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`These emissions are reported under `,_jsx(_components.strong,{children:`Scope 3, Category 5 (waste generated in operations)`}),` of the\n`,_jsx(_components.a,{href:`https://ghgprotocol.org/sites/default/files/2022-12/Chapter5.pdf`,children:`GHG Protocol`}),`.`]}),`\n`,_jsx(_components.p,{children:`A waste record is characterized by:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What`}),_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Where it was generated`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`facility_percentages`})}),_jsxs(_components.td,{children:[`Each facility inside your `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),` and its share. A whole waste of one facility is `,_jsx(_components.code,{children:`[{facility_id, percentage: 1}]`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`When`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`start_date`}),`, `,_jsx(_components.code,{children:`end_date`})]}),_jsxs(_components.td,{children:[`The period the waste belongs to, usually that of a collection by the waste manager. A collection with a single date sends it as both `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`How much`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`base_quantity`}),`, `,_jsx(_components.code,{children:`unit_id`})]}),_jsxs(_components.td,{children:[`In kilograms or tonnes, e.g. 1,250.5 kg, or 1.25 t for 1,250 kg. In tonnes, up to 3 decimals (1 kg); send a finer quantity in kilograms. Another unit needs your own emission factor in that unit (see `,_jsx(_components.code,{children:`unit_id`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`What type of waste`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`waste_ler_code_id`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`LER`}),` code (European List of Waste, Commission Decision 2000/532/EC): six digits with no spaces, e.g. `,_jsx(_components.code,{children:`150106`}),` mixed packaging; a trailing asterisk marks hazardous waste (`,_jsx(_components.code,{children:`130205*`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`How it is treated`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`waste_rd_code_id`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`R/D`}),` code: a recovery (`,_jsx(_components.code,{children:`R…`}),`) or disposal (`,_jsx(_components.code,{children:`D…`}),`) operation from Annexes I and II of the Waste Framework Directive 2008/98/EC, plus `,_jsx(_components.code,{children:`R14`}),` (preparation for reuse), written with two digits as the catalog returns it. E.g. `,_jsx(_components.code,{children:`R03`}),` recycling of organic substances, `,_jsx(_components.code,{children:`D01`}),` landfill. `,_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:`List R/D Codes`}),` has the ones Dcycle accepts.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Who manages it`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`provider_name`}),`, `,_jsx(_components.code,{children:`transporter_name`}),`, `,_jsx(_components.code,{children:`destination`})]}),_jsx(_components.td,{children:`The waste manager, the carrier and the treatment plant.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`how-the-emissions-are-calculated`,children:`How the emissions are calculated`}),`\n`,_jsxs(_components.p,{children:[`Emissions are the quantity multiplied by an emission factor. What you send determines `,_jsx(_components.strong,{children:`how Dcycle finds that\nfactor`}),`. Only when you bring your own factor do you choose it.`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`LER code (and R/D code when you have it):`}),` the standard route. The codes classify the waste in a common\nterminology, and Dcycle looks up the factor mapped to that LER + R/D pair in its emission factor databases: DEFRA\nby default, OCCC when DEFRA does not cover the code. With the LER code alone, Dcycle uses DEFRA’s landfill factor\nfor its material (its combustion factor where DEFRA publishes no landfill one), the conservative choice when the\ntreatment is unknown, or, for a code DEFRA does not cover, OCCC’s average across treatments for its waste\nfraction. A recovery treatment usually has a lower factor, so send the R/D code whenever you know it.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`No codes, only a `,_jsx(_components.code,{children:`description`}),`:`]}),` Dcycle compares the description with the factors of its maintained emission\nfactor databases and selects the closest one for each year of the waste period. No LER or R/D code is assigned to\nthe record. A low-confidence match is still applied and counts; the waste is flagged so someone confirms the\nfactor. Use it when your source data has no LER code.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Your own factor, `,_jsx(_components.code,{children:`custom_ef_record_id`}),`:`]}),` the only route where you choose the factor. The id of a\n`,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/overview`,children:`custom emission factor record`}),` you created beforehand in a custom\nemission factor database of your organization, with `,_jsx(_components.code,{children:`wastes`}),` among its activity categories. Use it when you have a\nfactor measured or provided by your waste manager. No LER code is needed; if you send one as well, your factor\ntakes precedence. See `,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/create-record`,children:`Create Custom Record`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A record needs at least one of the three. If Dcycle cannot find a factor (the code pair is not covered, or no factor\ncan be applied from the description), the waste is still stored and its calculation ends as `,_jsx(_components.code,{children:`CALCULATION_FAILED`}),` in\nthe job’s items.`]}),`\n`,_jsx(_components.p,{children:`Each year of the waste period is priced with that year’s edition of the database, or with its latest edition for a\nyear it has no edition of. A period that spans several years is split between them in proportion to its days.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Transport`}),` to the waste center is calculated only when `,_jsx(_components.code,{children:`total_km_to_waste_center`}),` is greater than 0. A waste in a\nweight unit is priced in tonne-kilometres (its quantity in tonnes × the distance); a waste in a volume (m3), per\nvehicle-kilometre. The freight factor is DEFRA’s heavy goods vehicle factor by default; another source, such as\necoinvent, is chosen in the Dcycle app, in the emission factors panel.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Sent with a description?`}),` A factor applied with low confidence counts like any other: the waste ends\n`,_jsx(_components.code,{children:`uploaded`}),`, with its emissions and `,_jsx(_components.code,{children:`LOW_CONFIDENCE_WASTE_FACTOR_MATCH`}),` in `,_jsx(_components.code,{children:`error_messages`}),`\n(`,_jsx(_components.a,{href:`/api-reference/wastes/get`,children:_jsx(_components.code,{children:`GET /v1/wastes/{waste_id}/detail`})}),`), and its job item is `,_jsx(_components.code,{children:`succeeded`}),`. Confirm the\nfactor in the Dcycle app. When no factor could be applied, the waste stays `,_jsx(_components.code,{children:`status: \"review\"`}),`, without emissions\nuntil someone picks a factor in the app, and its job item is `,_jsx(_components.code,{children:`failed`}),` with `,_jsx(_components.code,{children:`CALCULATION_FAILED`}),`. A description that\nnames a material but no treatment is calculated with the database’s default treatment for that material, with\n`,_jsx(_components.code,{children:`WASTE_DEFAULT_TREATMENT_ASSUMED`}),` in `,_jsx(_components.code,{children:`error_messages`}),`. To calculate the real treatment, name it in the `,_jsx(_components.code,{children:`description`}),`\n(e.g. “recycling”, “landfill”) or send the LER code with its R/D code (`,_jsx(_components.code,{children:`waste_ler_code_id`}),` and `,_jsx(_components.code,{children:`waste_rd_code_id`}),`):\nan R/D code without a LER code is not used.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`find-the-ids-you-send`,children:`Find the ids you send`}),`\n`,_jsx(_components.p,{children:`A record does not carry your own codes: every reference is a Dcycle id (UUID). Look them up once and keep the\nmapping on your side; the catalogs rarely change. The ids of the LER, R/D and unit catalogs are the same in every\nDcycle environment, so the ones in these examples work as they are.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Where to find it`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`facility_percentages[].facility_id`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/api-reference/facilities/list`,children:_jsx(_components.code,{children:`GET /v1/facilities`})}),`: the facilities of your organization; add `,_jsx(_components.code,{children:`consolidate_group=true`}),` to include those of its subsidiaries.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unit_id`})}),_jsxs(_components.td,{children:[`Kilograms `,_jsx(_components.code,{children:`61743a63-ff70-459c-9567-5eee8f7dfd5c`}),` or tonnes `,_jsx(_components.code,{children:`cab66828-c2b1-431b-92af-f9ab37149d3c`}),`, the units `,_jsx(_components.a,{href:`/api-reference/units/list`,children:_jsx(_components.code,{children:`GET /v2/units?type=wastes`})}),` lists. Any other unit needs a `,_jsx(_components.code,{children:`custom_ef_record_id`}),` whose factor is per that unit; a per-m3 factor takes m3 only.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`waste_ler_code_id`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/api-reference/wastes/ler-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/ler-codes?search=150106`})}),`: the `,_jsx(_components.code,{children:`id`}),` of the LER code. The catalog is the same for every organization.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`waste_rd_code_id`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/rd-codes?ler_code_id=…`})}),`: scoped to the LER code, it lists only the treatments that have an emission factor for it.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`custom_ef_record_id`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/api-reference/custom-emission-factors/list-records`,children:`List Custom Records`}),`, only when you bring your own factor.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`You send a list of records (`,_jsx(_components.code,{children:`records`}),`), one object per waste.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`All or nothing:`}),` every record is validated. If `,_jsx(_components.strong,{children:`any`}),` record is invalid, the whole request is rejected with\n`,_jsx(_components.code,{children:`422 BULK_RECORDS_REJECTED`}),` and `,_jsx(_components.strong,{children:`nothing is written`}),`: `,_jsx(_components.code,{children:`rejected`}),` is the number of invalid records and `,_jsx(_components.code,{children:`errors`}),`\nlists them (up to 100). Fix them and resend the full batch.`]}),`\n`,_jsxs(_components.li,{children:[`If every record is valid, all wastes are written in one transaction and the API answers `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`202 Accepted`})}),` with the\ningest job and a `,_jsx(_components.code,{children:`Location`}),` header pointing at it.`]}),`\n`,_jsxs(_components.li,{children:[`A worker calculates the emissions in chunks of 100 records. Poll\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{job_id}`})}),` until `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`completed`}),` or\n`,_jsx(_components.code,{children:`completed_with_errors`}),`, then read the per-record outcomes at\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/list-items`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{job_id}/items`})}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`When every chunk is done`}),`, a job submitted with an API key also sends\n`,_jsx(_components.a,{href:`/api-reference/webhooks/overview`,children:_jsx(_components.code,{children:`ingest_job.finished`})}),` to your webhook endpoints, so you can wait for it instead\nof polling. (A batch sent by someone signed in to Dcycle notifies them in the app instead.)`]}),`\n`]}),`\n`,_jsx(Mermaid,{chart:`sequenceDiagram\n participant C as Client\n participant A as Dcycle API\n participant W as Worker\n C->>A: POST /v2/wastes {records: [...]}\n alt any record invalid\n A-->>C: 422 BULK_RECORDS_REJECTED (invalid records counted, up to 100 listed)\n else all records valid\n A->>A: write wastes + job + ledger (one transaction)\n A-->>C: 202 Accepted, Location: /v2/ingest-jobs/{id}, status \"processing\"\n loop per chunk of 100 records\n W->>W: calculate emissions\n end\n W-->>C: webhook ingest_job.finished (API key requests)\n C->>A: GET /v2/ingest-jobs/{id}\n A-->>C: status \"completed\" | \"completed_with_errors\"\n end`}),`\n`,_jsx(Heading,{level:`2`,id:`one-waste-or-many`,children:`One waste or many`}),`\n`,_jsxs(_components.p,{children:[`The same request creates one waste or a whole batch. To create a single waste, send `,_jsx(_components.code,{children:`records`}),` with one element; it\ngoes through the same validation, the same job and the same calculation as a batch. For more than 5,000 records,\nsplit them into several requests (see `,_jsx(_components.a,{href:`#limits`,children:`Limits`}),`).`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsxs(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:[_jsxs(_components.p,{children:[`Your API key (see `,_jsx(_components.a,{href:`/api-reference/introduction#authentication`,children:`Authentication`}),`).`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:\"${DCYCLE_API_KEY}\"})]})]}),`\n`,_jsxs(ParamField,{header:`x-organization-id`,type:`string`,required:true,id:`param-x-organization-id`,children:[_jsxs(_components.p,{children:[`UUID of the organization the wastes are created for: in Dcycle, `,_jsx(_components.strong,{children:`Company settings → Organization info`}),`, click\n`,_jsx(_components.strong,{children:`Copy organization ID`}),` (`,_jsx(_components.a,{href:`/docs/authentication#get-an-api-key`,children:`Get an API Key`}),`). Every facility of its\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),` (the organization and its accepted, enabled\nsubsidiaries) is a valid destination.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`a8315ef3-dd50-43f8-b7ce-d839e68d51fa`})]})]}),`\n`,_jsx(ParamField,{header:`Content-Type`,type:`string`,required:true,id:`param-content-type`,children:_jsxs(_components.p,{children:[`Must be `,_jsx(_components.code,{children:`application/json`})]})}),`\n`,_jsxs(ParamField,{header:`Idempotency-Key`,type:`string`,required:true,id:`param-idempotency-key`,children:[_jsxs(_components.p,{children:[`1 to 255 characters. Send one key per batch (a UUID works well); it is looked up per organization across every v2\nbulk route (wastes, facilities, invoices…). Within 24 hours, the same key with the same route and body returns\n`,_jsx(_components.strong,{children:`that same job`}),` (with `,_jsx(_components.code,{children:`Idempotent-Replayed: true`}),`) instead of creating the wastes again, so a timeout or network\nerror can be retried safely. The same key with a `,_jsx(_components.strong,{children:`different`}),` body or on another route is rejected with\n`,_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`: use a new key for a new batch. A retry that arrives while the first request is still\nbeing processed gets `,_jsx(_components.code,{children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`. After 24 hours the key is free and a request with it is a\nnew one, so retry within that window. See\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#the-idempotency-key`,children:`The Idempotency-Key`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`c41d8e77-5d40-4a11-9e8b-2c9f4d1e7a03`})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsx(ParamField,{query:`dry_run`,type:`boolean`,default:`false`,id:`param-dry-run`,children:_jsxs(_components.p,{children:[`Validate only. The record checks run without writing: an invalid batch answers the same `,_jsx(_components.code,{children:`422`}),`, `,_jsx(_components.strong,{children:`nothing is\nwritten`}),` and no job is created; a valid batch answers `,_jsx(_components.code,{children:`200`}),` with `,_jsx(_components.code,{children:`{\"dry_run\": true, \"submitted\": n, \"valid\": n}`}),`.\nUse it to test an integration without creating data. The `,_jsx(_components.code,{children:`Idempotency-Key`}),` header is still required, but a dry\nrun does not check or store it, so you can send the real request with the same key afterwards. See\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#dry-run`,children:`Dry run`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsxs(ParamField,{body:`records`,type:`array[object]`,required:true,id:`param-records`,children:[_jsxs(_components.p,{children:[`The wastes to create: between 1 and 5,000 objects. Each record has the fields below; a field it does not\ndeclare (a typo, or `,_jsx(_components.code,{children:`facility_id`}),`) rejects the record with `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`.`]}),_jsxs(Expandable,{title:`record fields`,children:[_jsxs(ParamField,{body:`facility_percentages`,type:`array[object]`,required:true,id:`param-facility-percentages`,children:[_jsxs(_components.p,{children:[`The facilities the waste belongs to and each one’s share, as in `,_jsx(_components.a,{href:`/api-reference/invoices/overview`,children:`invoices v2`}),`.\nOne waste is created per entry, with `,_jsx(_components.code,{children:`quantity = base_quantity × percentage`}),`; each waste’s `,_jsx(_components.code,{children:`quantity`}),` is\nstored with 3 decimals (2 t at 0.3333 gives 0.667 t). A whole waste of one facility is `,_jsx(_components.code,{children:`[{facility_id, percentage: 1}]`}),`. Each\nfacility once, all inside your `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),`, and the percentages add up to 1 at most; under 1,\nthe rest of the waste is not counted. Facility ids come from\n`,_jsx(_components.a,{href:`/api-reference/facilities/list`,children:_jsx(_components.code,{children:`GET /v1/facilities`})}),`.`]}),_jsxs(Expandable,{title:`entry fields (only these two)`,children:[_jsx(ParamField,{body:`facility_id`,type:`uuid`,required:true,id:`param-facility-id`,children:_jsx(_components.p,{children:`UUID of the facility receiving this share.`})}),_jsxs(ParamField,{body:`percentage`,type:`number`,required:true,id:`param-percentage`,children:[_jsx(_components.p,{children:`Fraction of the quantity, greater than 0 and at most 1.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`0.6`})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`[{\"facility_id\": \"660e8400-e29b-41d4-a716-446655440000\", \"percentage\": 1}]`})]})]}),_jsxs(ParamField,{body:`identification_name`,type:`string`,required:true,id:`param-identification-name`,children:[_jsx(_components.p,{children:`Waste identification name or invoice/delivery-note number.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"ALB-2026-09-0001\"`})]})]}),_jsxs(ParamField,{body:`start_date`,type:`date`,required:true,id:`param-start-date`,children:[_jsxs(_components.p,{children:[`Start of the waste period (ISO 8601), from 1970 to `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#activity-dates`,children:`tomorrow in UTC at the latest`}),`. Send the period of each collection by the\nwaste manager as your data has it; a collection with a single date sends it as both `,_jsx(_components.code,{children:`start_date`}),` and\n`,_jsx(_components.code,{children:`end_date`}),`. A period that spans several years is split between them in proportion to its days.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"2026-09-01\"`})]})]}),_jsxs(ParamField,{body:`end_date`,type:`date`,required:true,id:`param-end-date`,children:[_jsxs(_components.p,{children:[`End of the waste period (ISO 8601), on or after `,_jsx(_components.code,{children:`start_date`}),`, `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#activity-dates`,children:`tomorrow in UTC at the latest`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"2026-09-30\"`})]})]}),_jsxs(ParamField,{body:`base_quantity`,type:`number`,required:true,id:`param-base-quantity`,children:[_jsxs(_components.p,{children:[`Quantity of waste in `,_jsx(_components.code,{children:`unit_id`}),`. Must be greater than 0. It is stored with 3 decimals. In tonnes, send at most 3\n(0.001 t is 1 kg): a finer quantity, such as 1.2505 t, rejects the record with `,_jsx(_components.code,{children:`TOO_MANY_DECIMALS`}),`; send it in\nkilograms instead (1,250.5 kg). Floating-point noise, such as 0.21000000000000002 t, is taken as 0.21 t. In any\nother unit, a finer quantity is rounded to 3 decimals (to the gram in kilograms).`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`1250.5`})]})]}),_jsxs(ParamField,{body:`unit_id`,type:`uuid`,required:true,id:`param-unit-id`,children:[_jsxs(_components.p,{children:[`Kilograms `,_jsx(_components.code,{children:`61743a63-ff70-459c-9567-5eee8f7dfd5c`}),` or tonnes `,_jsx(_components.code,{children:`cab66828-c2b1-431b-92af-f9ab37149d3c`}),`, the units\n`,_jsx(_components.a,{href:`/api-reference/units/list`,children:_jsx(_components.code,{children:`GET /v2/units?type=wastes`})}),` lists. A quantity in a unit other than that of the\nemission factor applied (per tonne in DEFRA, the default database) is converted to it, and the calculation detail\nin the app shows that step. Any unit other than kilograms or tonnes is supported only with your own emission\nfactor: a waste\npriced with a `,_jsx(_components.code,{children:`custom_ef_record_id`}),` may use the unit of that record, the one its factor is per; when that unit\nis not a weight (m3), only it, since kilograms and tonnes cannot be converted to it. The Dcycle app offers custom factors for\nwastes per kilogram or per cubic metre (`,_jsx(_components.a,{href:`/api-reference/units/list`,children:_jsx(_components.code,{children:`GET /v2/units?type=custom_emission_factors_wastes`})}),`):\nsend a volume in m3 (litres ÷1,000) with a per-m3 factor. A custom factor in another unit works the same way: a\nweight unit lets the waste use kilograms, tonnes or that unit, and any other unit only itself. A record without\na unit is rejected with `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`, and one with any other unit with `,_jsx(_components.code,{children:`UNIT_NOT_SUPPORTED`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`})]})]}),_jsxs(ParamField,{body:`waste_ler_code_id`,type:`uuid`,id:`param-waste-ler-code-id`,children:[_jsxs(_components.p,{children:[`UUID of the LER (European List of Waste) code, taken from\n`,_jsx(_components.a,{href:`/api-reference/wastes/ler-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/ler-codes`})}),`. Required unless you send a `,_jsx(_components.code,{children:`custom_ef_record_id`}),`,\nor a non-empty `,_jsx(_components.code,{children:`description`}),` (then the description is matched to a waste type automatically before the\ncalculation).`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"33d3e986-2e02-4aaa-8be0-708c143c02d9\"`}),` (`,_jsx(_components.code,{children:`150106`}),`, mixed packaging)`]})]}),_jsxs(ParamField,{body:`waste_rd_code_id`,type:`uuid`,id:`param-waste-rd-code-id`,children:[_jsxs(_components.p,{children:[`UUID of the R/D (recovery/disposal) treatment code, taken from\n`,_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/rd-codes?ler_code_id=…`})}),`, which lists the treatments with an\nemission factor for that LER code. Optional, but send it when you know the treatment: without it Dcycle prices\nthe waste with a conservative default factor (see `,_jsx(_components.a,{href:`#how-the-emissions-are-calculated`,children:`How the emissions are calculated`}),`).`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"6617caab-9db0-40df-8716-54d8c94e8056\"`}),` (`,_jsx(_components.code,{children:`R03`}),`)`]})]}),_jsxs(ParamField,{body:`description`,type:`string`,default:``,id:`param-description`,children:[_jsxs(_components.p,{children:[`Description of the waste. Required (non-empty) when `,_jsx(_components.code,{children:`waste_ler_code_id`}),` is omitted.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"Mezcla de envases ligeros\"`})]})]}),_jsxs(ParamField,{body:`destination`,type:`string`,default:``,id:`param-destination`,children:[_jsx(_components.p,{children:`Waste destination or treatment facility.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"Centro de tratamiento Ecoveza\"`})]})]}),_jsxs(ParamField,{body:`provider_name`,type:`string | null`,id:`param-provider-name`,children:[_jsx(_components.p,{children:`Business name of the waste manager that treats the waste.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"Ecoveza S.L.\"`})]})]}),_jsxs(ParamField,{body:`transporter_name`,type:`string | null`,id:`param-transporter-name`,children:[_jsx(_components.p,{children:`Business name of the carrier that takes the waste to the treatment plant, when it is not the waste manager.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"Transportes Levante S.L.\"`})]})]}),_jsxs(ParamField,{body:`total_km_to_waste_center`,type:`number`,default:`0`,id:`param-total-km-to-waste-center`,children:[_jsxs(_components.p,{children:[`Distance to the waste center in km, used to calculate collection transport emissions. Optional: with `,_jsx(_components.code,{children:`0`}),`, the\ndefault, the waste has no transport emissions. How the distance is priced is in\n`,_jsx(_components.a,{href:`#how-the-emissions-are-calculated`,children:`How the emissions are calculated`}),`. From 0 to 500,000.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`42`})]})]}),_jsxs(ParamField,{body:`custom_ef_record_id`,type:`uuid | null`,id:`param-custom-ef-record-id`,children:[_jsxs(_components.p,{children:[`UUID of one of your `,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/overview`,children:`custom emission factor records`}),`, to\ncalculate this waste with your own factor instead of the standard databases. The record must be visible to the organization of the first facility in\n`,_jsx(_components.code,{children:`facility_percentages`}),` (the one that owns the waste), enabled, and configured for the `,_jsx(_components.code,{children:`wastes`}),` activity category. With it, `,_jsx(_components.code,{children:`waste_ler_code_id`}),` is optional. In a\nsplit (`,_jsx(_components.code,{children:`facility_percentages`}),`), every resulting waste uses the same factor.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"c3d4e5f6-a7b8-9012-cdef-ab3456789012\"`})]})]}),_jsx(ParamField,{body:`file_url`,type:`string | null`,id:`param-file-url`,children:_jsxs(_components.p,{children:[`URL of a supporting document (e.g. a waste manifest), or the document itself as a base64 data URI\n(`,_jsx(_components.code,{children:`data:\u003cmime>;base64,...`}),`), which is uploaded and stored as a URL. A data URI that is not valid base64 rejects\nthe record with `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`.`]})}),_jsx(ParamField,{body:`file_name`,type:`string | null`,id:`param-file-name`,children:_jsxs(_components.p,{children:[`Original name of the attached document (e.g. `,_jsx(_components.code,{children:`manifest.xlsx`}),`), up to 255 characters.`]})}),_jsxs(ParamField,{body:`file_id`,type:`uuid | null`,id:`param-file-id`,children:[_jsxs(_components.p,{children:[`UUID of a file of your `,_jsx(_components.a,{href:`/api-reference/files/upload`,children:`files`}),` to attach as the supporting document, instead of\nsending it inline in `,_jsx(_components.code,{children:`file_url`}),`: upload it first (`,_jsx(_components.code,{children:`POST /v1/files/presigned-urls`}),` with `,_jsx(_components.code,{children:`skip_processing: true`}),` so it is\nstored without being read, the upload, then `,_jsx(_components.code,{children:`PATCH /v1/files/batch-update`}),` to `,_jsx(_components.code,{children:`uploaded`}),`). The waste stores the file’s URL and its name with extension as `,_jsx(_components.code,{children:`file_url`}),` and `,_jsx(_components.code,{children:`file_name`}),` (both\nsent are ignored). The file must be `,_jsx(_components.code,{children:`uploaded`}),` and belong to your organization or one you can write to; any\nother id rejects the record with `,_jsx(_components.code,{children:`REFERENCE_NOT_FOUND`}),` (`,_jsx(_components.code,{children:`field: \"file_id\"`}),`). Sent together with a data URI in\n`,_jsx(_components.code,{children:`file_url`}),`, the record is rejected with `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`. In a split, every resulting waste links the same file.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"7c9e6679-7425-40de-944b-e07fc1f90ae7\"`})]})]}),_jsxs(ParamField,{body:`attachment_file_id`,type:`uuid | null`,id:`param-attachment-file-id`,children:[_jsxs(_components.p,{children:[`UUID of a file of your `,_jsx(_components.a,{href:`/api-reference/files/upload`,children:`files`}),` to attach to the waste as its supporting document\n(e.g. the waste manifest), uploaded as for `,_jsx(_components.code,{children:`file_id`}),`. Unlike `,_jsx(_components.code,{children:`file_id`}),`, the waste keeps it apart from the file it\nwas read from, and reads it back in `,_jsx(_components.code,{children:`attachment`}),` of `,_jsx(_components.a,{href:`/api-reference/wastes/get`,children:`Get Waste`}),`. The file must be\n`,_jsx(_components.code,{children:`uploaded`}),` and belong to your organization or one you can write to, and a private file only to the organization\nof every facility; any other id rejects the record with `,_jsx(_components.code,{children:`REFERENCE_NOT_FOUND`}),` (`,_jsx(_components.code,{children:`field: \"attachment_file_id\"`}),`). In\na split, every resulting waste takes it.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"7c9e6679-7425-40de-944b-e07fc1f90ae7\"`})]})]}),_jsxs(ParamField,{body:`client_row_id`,type:`string | null`,id:`param-client-row-id`,children:[_jsx(_components.p,{children:`Your own identifier for the record, up to 255 characters. It is echoed on every outcome for this record (in\nrejections and in the job’s items), so you can correlate results without tracking array positions.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"ALB-2026-09-0001\"`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`202-accepted`,children:`202 Accepted`}),`\n`,_jsxs(_components.p,{children:[`Every record passed validation and was stored. The body is the ingest job; the `,_jsx(_components.code,{children:`Location`}),` header holds its path.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`/`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1.1`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` 202`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` Accepted`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#85E89D`},children:`Location`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` /v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"processing\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"entity_type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"wastes\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"operation\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"create\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"api_bulk\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"counts\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"submitted\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`250`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"succeeded\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"chunks_total\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`3`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"chunks_done\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-29T10:15:02.184Z\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"finished_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"links\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"self\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"items\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa/items\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsx(ResponseField,{name:`id`,type:`uuid`,id:`param-id`,children:_jsxs(_components.p,{children:[`Ingest job id. Use it with `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{job_id}`})}),`.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`processing`}),` right after the request. See `,_jsx(_components.a,{href:`#job-status`,children:`Job status`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`entity_type`,type:`string`,id:`param-entity-type`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`wastes`}),` for this endpoint.`]})}),`\n`,_jsx(ResponseField,{name:`operation`,type:`string`,id:`param-operation`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`create`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`source`,type:`string`,id:`param-source`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`api_bulk`}),` when sent with an API key; `,_jsx(_components.code,{children:`app`}),` when sent by a person signed in to Dcycle (e.g. the app’s waste form).`]})}),`\n`,_jsx(ResponseField,{name:`counts`,type:`object`,id:`param-counts`,children:_jsxs(Expandable,{title:`fields`,children:[_jsx(ResponseField,{name:`submitted`,type:`integer`,id:`param-submitted`,children:`Records in the request. All of them were stored.`}),_jsx(ResponseField,{name:`succeeded`,type:`integer`,id:`param-succeeded`,children:`Records whose emissions have been calculated.`}),_jsx(ResponseField,{name:`failed`,type:`integer`,id:`param-failed`,children:_jsx(_components.p,{children:`Records whose calculation failed. The waste exists but has no emissions; the job’s items say which ones.`})})]})}),`\n`,_jsx(ResponseField,{name:`chunks_total`,type:`integer`,id:`param-chunks-total`,children:_jsx(_components.p,{children:`Number of calculation chunks (100 records each).`})}),`\n`,_jsx(ResponseField,{name:`chunks_done`,type:`integer`,id:`param-chunks-done`,children:_jsxs(_components.p,{children:[`Chunks already calculated. `,_jsx(_components.code,{children:`chunks_done / chunks_total`}),` is the job’s progress.`]})}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`datetime`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the job was created (UTC).`})}),`\n`,_jsx(ResponseField,{name:`finished_at`,type:`datetime | null`,id:`param-finished-at`,children:_jsxs(_components.p,{children:[`When the last chunk finished (UTC), `,_jsx(_components.code,{children:`null`}),` while the job is processing.`]})}),`\n`,_jsx(ResponseField,{name:`links`,type:`object`,id:`param-links`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`self`}),`: the job. `,_jsx(_components.code,{children:`items`}),`: its per-record outcomes.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`job-status`,children:`Job status`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`processing`})}),_jsx(_components.td,{children:`Wastes are stored; emissions are being calculated.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed`})}),_jsx(_components.td,{children:`Every record was calculated.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed_with_errors`})}),_jsxs(_components.td,{children:[`Every chunk ran, and at least one record failed to calculate (`,_jsx(_components.code,{children:`counts.failed > 0`}),`). The other records are calculated normally.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`While a job is `,_jsx(_components.code,{children:`processing`}),`, the new wastes already exist without emissions (`,_jsx(_components.code,{children:`co2e`}),` is `,_jsx(_components.code,{children:`null`}),`); the value is filled in\nwhen their chunk is calculated. Each record’s waste id is its `,_jsx(_components.code,{children:`entity_id`}),` in the\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/list-items`,children:`job’s items`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`chunks_done`}),` stops moving, see `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get#a-job-that-does-not-finish`,children:`A job that does not finish`}),`:\nnever resend the batch with a new `,_jsx(_components.code,{children:`Idempotency-Key`}),`, because its wastes are already stored.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`why-a-record-failed-to-calculate`,children:`Why a record failed to calculate`}),`\n`,_jsxs(_components.p,{children:[`A failed item carries `,_jsx(_components.code,{children:`error_code: CALCULATION_FAILED`}),` with `,_jsx(_components.code,{children:`error_params: null`}),`. For the reason, read the waste\nwith `,_jsx(_components.a,{href:`/api-reference/wastes/get`,children:_jsx(_components.code,{children:`GET /v1/wastes/{waste_id}/detail`})}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`status: \"error\"`}),`: no emission factor covers its LER/R/D pair. A pair missing from\n`,_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/rd-codes?ler_code_id=…`})}),` never has one; a listed pair usually does.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`status: \"review\"`}),`: it came with a `,_jsx(_components.code,{children:`description`}),` that matched no factor. It has no emissions until someone picks\nthe factor in Dcycle.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`Errors follow `,_jsx(_components.a,{href:`/api-reference/errors`,children:`RFC 9457 problem details`}),` (`,_jsx(_components.code,{children:`Content-Type: application/problem+json`}),`): a stable\n`,_jsx(_components.code,{children:`code`}),`, a human `,_jsx(_components.code,{children:`detail`}),`, `,_jsx(_components.code,{children:`errors`}),` when there is a list of problems, and the `,_jsx(_components.code,{children:`request_id`}),` to quote to support.`]}),`\n`,_jsx(Heading,{level:`3`,id:`422-bulk_records_rejected-—-invalid-records`,children:`422 BULK_RECORDS_REJECTED — invalid records`}),`\n`,_jsxs(_components.p,{children:[`At least one record is invalid. `,_jsx(_components.strong,{children:`Nothing was written.`}),` `,_jsx(_components.code,{children:`rejected`}),` is the number of invalid records and `,_jsx(_components.code,{children:`errors`}),`\nlists them (up to 100) in submission order, each with its position in `,_jsx(_components.code,{children:`records`}),` (`,_jsx(_components.code,{children:`source_row_index`}),`, starting at 0),\nyour `,_jsx(_components.code,{children:`client_row_id`}),` and a stable `,_jsx(_components.code,{children:`error_code`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Each record carries `,_jsx(_components.strong,{children:`one`}),` `,_jsx(_components.code,{children:`error_code`}),`: the first rule it breaks. A record with two problems shows the second one\nonly after you fix the first, so validate again with `,_jsx(_components.code,{children:`?dry_run=true`}),` before sending the batch. (`,_jsx(_components.code,{children:`SCHEMA_INVALID`}),` is\nthe exception inside a record: its `,_jsx(_components.code,{children:`error_params.errors`}),` lists all of the record’s schema problems, up to 10.)`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`33`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`33`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Unprocessable Entity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`422`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"3 of the submitted records are invalid; nothing was written.\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0002\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"REFERENCE_NOT_FOUND\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"field\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"facility_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"00000000-0000-0000-0000-00000000c0de\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`2`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0003\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"SCHEMA_INVALID\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"loc\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"base_quantity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"greater_than\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"msg\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Input should be greater than 0\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`4`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0005\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"UNIT_NOT_SUPPORTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"field\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"unit_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"54a709bf-79fe-4acb-ab85-5e1d7cd26eb4\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"supported\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"cab66828-c2b1-431b-92af-f9ab37149d3c\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"rejected\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`3`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`error_code`})}),_jsx(_components.th,{children:`Cause`}),_jsx(_components.th,{children:`Fix`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SCHEMA_INVALID`})}),_jsxs(_components.td,{children:[`The record does not match the record schema: a missing required field (`,_jsx(_components.code,{children:`unit_id`}),` and `,_jsx(_components.code,{children:`facility_percentages`}),` included), a field the record or one of its `,_jsx(_components.code,{children:`facility_percentages`}),` entries does not declare (`,_jsx(_components.code,{children:`extra_forbidden`}),`, e.g. a typo, `,_jsx(_components.code,{children:`facility_id`}),`, or `,_jsx(_components.code,{children:`organization_id`}),` in an entry), a wrong type, `,_jsx(_components.code,{children:`base_quantity`}),` ≤ 0, a date outside 1970 to next year (`,_jsx(_components.code,{children:`activity_date_out_of_range`}),`), a date after tomorrow in UTC (`,_jsx(_components.code,{children:`date_in_the_future`}),`), `,_jsx(_components.code,{children:`end_date`}),` before `,_jsx(_components.code,{children:`start_date`}),`, or the record is not a JSON object. `,_jsx(_components.code,{children:`error_params.errors`}),` lists each problem with its field (`,_jsx(_components.code,{children:`loc`}),`; empty when the problem spans fields, as with `,_jsx(_components.code,{children:`end_date`}),` before `,_jsx(_components.code,{children:`start_date`}),`).`]}),_jsx(_components.td,{children:`Correct the listed fields.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FACILITIES_MUST_BE_UNIQUE`})}),_jsxs(_components.td,{children:[`A facility appears twice in `,_jsx(_components.code,{children:`facility_percentages`}),`.`]}),_jsx(_components.td,{children:`List each facility once.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REFERENCE_NOT_FOUND`})}),_jsxs(_components.td,{children:[`An id the record references does not exist or is outside your `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),`: a facility (`,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`facility_id`}),`; a disabled facility too), `,_jsx(_components.code,{children:`waste_ler_code_id`}),` or `,_jsx(_components.code,{children:`waste_rd_code_id`}),`; or a `,_jsx(_components.code,{children:`file_id`}),` or `,_jsx(_components.code,{children:`attachment_file_id`}),` that is not an `,_jsx(_components.code,{children:`uploaded`}),` file you can attach to every facility’s organization. Both cases answer the same, so ids cannot be probed.`]}),_jsxs(_components.td,{children:[`Use an enabled facility of your organization or of one of its accepted, enabled subsidiaries, and take the codes from `,_jsx(_components.a,{href:`/api-reference/wastes/ler-codes`,children:`LER codes`}),` and `,_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:`R/D codes`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FACILITY_PERCENTAGES_INVALID`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`facility_percentages`}),` add up to more than 1 (beyond 0.0001).`]}),_jsx(_components.td,{children:`Make them add up to 1 or less.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WASTE_LER_OR_DESCRIPTION_REQUIRED`})}),_jsxs(_components.td,{children:[`None of `,_jsx(_components.code,{children:`waste_ler_code_id`}),`, `,_jsx(_components.code,{children:`custom_ef_record_id`}),` or a non-empty `,_jsx(_components.code,{children:`description`}),` was sent.`]}),_jsx(_components.td,{children:`Send one of them.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`UNIT_NOT_SUPPORTED`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`unit_id`}),` is neither kilograms, tonnes nor the unit of the record’s `,_jsx(_components.code,{children:`custom_ef_record_id`}),`, or, with a per-m3 factor, not m3. `,_jsx(_components.code,{children:`error_params.supported`}),` lists the accepted unit ids.`]}),_jsxs(_components.td,{children:[`Send the quantity in one of the units of `,_jsx(_components.code,{children:`error_params.supported`}),`: kilograms (`,_jsx(_components.code,{children:`61743a63-ff70-459c-9567-5eee8f7dfd5c`}),`) or tonnes (`,_jsx(_components.code,{children:`cab66828-c2b1-431b-92af-f9ab37149d3c`}),`), or m3 with a per-m3 factor. For another unit, price the waste with a `,_jsx(_components.code,{children:`custom_ef_record_id`}),` whose factor is per that unit.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`TOO_MANY_DECIMALS`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`base_quantity`}),` is in tonnes with more than 3 decimals, a precision finer than 1 kg. Floating-point noise in the last digits does not count: 0.21000000000000002 t is taken as 0.21 t. `,_jsx(_components.code,{children:`error_params`}),` has the `,_jsx(_components.code,{children:`field`}),` (`,_jsx(_components.code,{children:`base_quantity`}),`), the `,_jsx(_components.code,{children:`value`}),` sent and `,_jsx(_components.code,{children:`max_decimals`}),` (3).`]}),_jsxs(_components.td,{children:[`Send the quantity in kilograms (`,_jsx(_components.code,{children:`61743a63-ff70-459c-9567-5eee8f7dfd5c`}),`): 1.2505 t is 1,250.5 kg.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIDB_CUSTOM_RECORD_NOT_FOUND_OR_DISABLED`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`custom_ef_record_id`}),` does not exist, is disabled, or is not visible to the organization of the first facility in `,_jsx(_components.code,{children:`facility_percentages`}),`.`]}),_jsx(_components.td,{children:`Use an enabled record of that organization (or shared with it).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIDB_CUSTOM_RECORD_INCOMPATIBLE_CATEGORY`})}),_jsxs(_components.td,{children:[`The custom emission factor record is not configured for the `,_jsx(_components.code,{children:`wastes`}),` activity category.`]}),_jsxs(_components.td,{children:[`Add `,_jsx(_components.code,{children:`wastes`}),` to the record’s activity categories.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`422-idempotency_key_reused`,children:`422 IDEMPOTENCY_KEY_REUSED`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`Idempotency-Key`}),` was used in this organization in the last 24 hours with a different body or on another route.\nNothing is written. Send a new key for a new batch; to retry the original batch, resend exactly the same body to the\nsame route (field order does not matter).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"https://code.dcycle.io/api-reference/errors#IDEMPOTENCY_KEY_REUSED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Unprocessable Entity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`422`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"IDEMPOTENCY_KEY_REUSED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"This Idempotency-Key was already used with a different request body or on another route. Use a new key per batch.\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`409-idempotency_key_in_progress`,children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`\n`,_jsxs(_components.p,{children:[`Another request with the same `,_jsx(_components.code,{children:`Idempotency-Key`}),` was still being processed, typically your own retry after a timeout.\nThis request wrote nothing. Wait the `,_jsx(_components.code,{children:`Retry-After`}),` seconds and retry with the same key and body: you get the job of\nthe request that went through. See `,_jsx(_components.a,{href:`/api-reference/errors#IDEMPOTENCY_KEY_IN_PROGRESS`,children:`IDEMPOTENCY_KEY_IN_PROGRESS`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`422-request_validation_failed-—-malformed-request`,children:`422 REQUEST_VALIDATION_FAILED — malformed request`}),`\n`,_jsxs(_components.p,{children:[`The request itself is invalid: the `,_jsx(_components.code,{children:`Idempotency-Key`}),` header is missing, or `,_jsx(_components.code,{children:`records`}),` is missing, empty or has more\nthan 5,000 entries. `,_jsx(_components.code,{children:`errors`}),` lists each problem with where it is (`,_jsx(_components.code,{children:`loc`}),`):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"https://code.dcycle.io/api-reference/errors#REQUEST_VALIDATION_FAILED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Unprocessable Entity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`422`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"REQUEST_VALIDATION_FAILED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:'\"The request is invalid (1 error(s)); see `errors`.\"'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"loc\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"header\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"msg\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"field required\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"value_error.missing\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`401-400-and-403-key-and-organization`,children:`401, 400 and 403: key and organization`}),`\n`,_jsxs(_components.p,{children:[`Before the records are looked at, the API key and the organization are checked. Each code has its section in\n`,_jsx(_components.a,{href:`/api-reference/errors#codes`,children:`Errors`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`401`}),`: no API key (`,_jsx(_components.code,{children:`AUTHENTICATION_REQUIRED`}),`), a wrong or revoked one (`,_jsx(_components.code,{children:`INVALID_API_KEY`}),`), an expired one\n(`,_jsx(_components.code,{children:`API_KEY_EXPIRED`}),`), a key of another organization (`,_jsx(_components.code,{children:`API_KEY_ORG_MISMATCH`}),`) or one too old to have an owner\n(`,_jsx(_components.code,{children:`API_KEY_NO_OWNER`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`400 ORGANIZATION_ID_REQUIRED`}),`: no `,_jsx(_components.code,{children:`x-organization-id`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`403`}),`: the key’s creator is not a member of the organization in `,_jsx(_components.code,{children:`x-organization-id`}),` (`,_jsx(_components.code,{children:`LOGGED_USER_NOT_MEMBER`}),`),\nthe key is read-only (`,_jsx(_components.code,{children:`API_KEY_SCOPE_DENIED`}),`), or its creator is a Viewer (`,_jsx(_components.code,{children:`VIEWER_CANNOT_WRITE`}),`).`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`429-too_many_requests`,children:`429 TOO_MANY_REQUESTS`}),`\n`,_jsxs(_components.p,{children:[`The API key, or its IP, sent more requests than the `,_jsx(_components.a,{href:`/api-reference/rate-limits`,children:`rate limits`}),` allow. Nothing was\nwritten: wait the `,_jsx(_components.code,{children:`Retry-After`}),` seconds and send the same request again, with the same `,_jsx(_components.code,{children:`Idempotency-Key`}),`. See\n`,_jsx(_components.a,{href:`/api-reference/errors#TOO_MANY_REQUESTS`,children:`TOO_MANY_REQUESTS`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`create-a-batch-and-wait-for-the-calculation`,children:`Create a batch and wait for the calculation`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`37`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`37`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -i`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/wastes\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-api-key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-organization-id: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`)\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"records\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\": \"ALB-2026-09-0001\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"facility_percentages\": [{ \"facility_id\": \"660e8400-e29b-41d4-a716-446655440000\", \"percentage\": 1 }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identification_name\": \"ALB-2026-09-0001\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\": \"2026-09-01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\": \"2026-09-30\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"base_quantity\": 1250.5,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"unit_id\": \"61743a63-ff70-459c-9567-5eee8f7dfd5c\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"waste_ler_code_id\": \"33d3e986-2e02-4aaa-8be0-708c143c02d9\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"waste_rd_code_id\": \"6617caab-9db0-40df-8716-54d8c94e8056\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"provider_name\": \"Ecoveza S.L.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"total_km_to_waste_center\": 42`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\": \"ALB-2026-09-0002\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"facility_percentages\": [{ \"facility_id\": \"660e8400-e29b-41d4-a716-446655440000\", \"percentage\": 1 }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identification_name\": \"ALB-2026-09-0002\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\": \"2026-09-01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\": \"2026-09-30\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"base_quantity\": 380,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"unit_id\": \"61743a63-ff70-459c-9567-5eee8f7dfd5c\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"description\": \"Mezcla de envases ligeros\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# Then poll the job from the Location header`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-api-key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-organization-id: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`62`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`62`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` time`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` uuid`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`BASE_URL`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"x-api-key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"DCYCLE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"x-organization-id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"DCYCLE_ORG_ID\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`records `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"facility_percentages\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"facility_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"660e8400-e29b-41d4-a716-446655440000\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"percentage\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identification_name\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-30\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"base_quantity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1250.5`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"unit_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"waste_ler_code_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"33d3e986-2e02-4aaa-8be0-708c143c02d9\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# One key per batch: reuse it only to retry this same batch.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`idempotency_key `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` str`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(uuid.uuid4())`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` f`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{BASE_URL}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`/v2/wastes\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`**`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: idempotency_key},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` json`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"records\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: records},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` timeout`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`60`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.status_code `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`==`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` 422`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` and`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.json().get(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`==`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` for`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` rejection `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`in`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.json()[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(rejection[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], rejection[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], rejection[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], rejection[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` raise`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` SystemExit`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Fix the listed records and resend the whole batch\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`response.raise_for_status()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job_url `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` BASE_URL`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` +`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.headers[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Location\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`while`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` True`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests.get(job_url, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`timeout`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`30`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`).json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`f`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'status'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'chunks_done'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`/`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'chunks_total'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` chunks\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`] `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`!=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"processing\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` break`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`10`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`] `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`==`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"completed_with_errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` page `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` 1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` while`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` True`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# up to 5,000 records: read every page of failures`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` failed `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests.get(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` f`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job_url`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`/items\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` params`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"size\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`500`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"page\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: page},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` timeout`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`30`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ).json()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` for`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` item `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`in`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` failed[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"items\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"calculation failed:\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, item[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], item[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` page `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`*`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` failed[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"size\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`] `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` failed[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"total\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` break`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` page `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`+=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` 1`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`35`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`35`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` axios`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` require`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'axios'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` require`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'crypto'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` api`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` axios.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`create`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` baseURL: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'https://api.dcycle.io'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'x-api-key'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'x-organization-id'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`async`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` function`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` createWastes`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`records`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` let`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` try`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` api.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`post`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'/v2/wastes'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, { records }, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` headers: { `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'Idempotency-Key'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`() },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`catch`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` (error) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` body`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` error.response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` error.response.data;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` (body `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` body.code `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'BULK_RECORDS_REJECTED'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` body.errors.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`forEach`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`r`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(r.source_row_index, r.client_row_id, r.error_code, r.error_params));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` throw`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` error;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` jobPath`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.headers.location;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` let`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.data;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` while`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` (job.status `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'processing'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` Promise`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`resolve`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =>`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` setTimeout`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(resolve, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`10000`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` (`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` api.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`get`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(jobPath)).data;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"`${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`status`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"}: ${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`chunks_done`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"}/${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`chunks_total`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"} chunks`\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` return`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`split-one-waste-across-two-facilities`,children:`Split one waste across two facilities`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"records\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0100\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"identification_name\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0100\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"start_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"end_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-30\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"base_quantity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`100`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"unit_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"waste_ler_code_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"33d3e986-2e02-4aaa-8be0-708c143c02d9\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"facility_percentages\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"facility_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"660e8400-e29b-41d4-a716-446655440000\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"percentage\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0.6`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"facility_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"770e8400-e29b-41d4-a716-446655440001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"percentage\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0.4`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This creates two wastes (60 and 40 units) sharing one `,_jsx(_components.code,{children:`source_invoice_id`}),`, the id of the first one, as\n`,_jsx(_components.a,{href:`/api-reference/wastes/list`,children:`List Wastes`}),` and `,_jsx(_components.a,{href:`/api-reference/wastes/get`,children:`Get Waste`}),` return it. The job has `,_jsx(_components.strong,{children:`one`}),`\nitem for the record, whose `,_jsx(_components.code,{children:`entity_id`}),` is the first waste of the group.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Each share is a waste of its own: `,_jsx(_components.a,{href:`/api-reference/wastes/delete-v2`,children:`deleting`}),` that `,_jsx(_components.code,{children:`entity_id`}),` removes only the\nfirst share (`,_jsx(_components.a,{href:`/api-reference/wastes/delete-v2#body-parameters`,children:`Delete Wastes`}),` shows how to find every share). If\nyour integration may need to delete or replace the record later, send one record per facility with that\nfacility’s quantity (`,_jsx(_components.code,{children:`[{facility_id, percentage: 1}]`}),`), so every waste has its own item and id.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`retries-and-idempotency`,children:`Retries and idempotency`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Network error or timeout:`}),` retry within 24 hours with the `,_jsx(_components.strong,{children:`same`}),` `,_jsx(_components.code,{children:`Idempotency-Key`}),` and body. If the first\nrequest was accepted, you get the same job back and no wastes are duplicated.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`422 BULK_RECORDS_REJECTED`}),`:`]}),` nothing was stored. Fix the records and send the batch again (a new key is fine,\nsince the first request created nothing).`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`:`]}),` the key already belongs to another batch. Use a new key, or resend the original\nbody unchanged.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`:`]}),` the first request with that key is still being processed. Wait `,_jsx(_components.code,{children:`Retry-After`}),`\nseconds and retry with the same key and body.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`429 TOO_MANY_REQUESTS`}),`:`]}),` nothing was written. Wait `,_jsx(_components.code,{children:`Retry-After`}),` seconds and resend with the same key and body.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Limit`}),_jsx(_components.th,{children:`Value`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Records per request`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1 to 5,000`})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Get Ingest Job`,icon:`magnifying-glass`,href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.p,{children:`Status and progress of the batch`})}),_jsx(Card,{title:`List Ingest Job Items`,icon:`list`,href:`/api-reference/ingest-jobs/list-items`,children:_jsx(_components.p,{children:`Per-record outcomes, including calculation failures`})}),_jsx(Card,{title:`Webhooks`,icon:`bell`,href:`/api-reference/webhooks/overview`,children:_jsx(_components.p,{children:`Be told when the job finishes instead of polling`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Create Wastes (v2)","api":"POST /v2/wastes","description":"Create one or up to 5,000 wastes in one request; emissions are calculated asynchronously and tracked through an ingest job","tag":"BETA","href":"/api-reference/wastes/create-v2"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Expandable,Heading,Mermaid,Note,ParamField,RequestExample,ResponseExample,ResponseField,Table,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create wastes: one, or up to 5,000 in a single request. The records are validated and stored at once, and their CO2e\nemissions are calculated `,_jsx(_components.strong,{children:`asynchronously`}),` by a background worker. The response is an `,_jsx(_components.strong,{children:`ingest job`}),` (see\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview`,children:`how bulk ingestion works`}),`), not the wastes themselves: follow it with\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{id}`})}),`, or, for a job submitted with an API key, let the\n`,_jsx(_components.a,{href:`/api-reference/webhooks/overview`,children:_jsx(_components.code,{children:`ingest_job.finished`})}),` webhook tell you when it ends, and read the per-record\noutcomes.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Beta.`}),` This endpoint is in beta: the contract may still change before general availability. Pin your\nintegration to the fields documented here and handle unknown fields in responses gracefully. Feedback is welcome\nthrough your Dcycle contact.`]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`19`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/wastes\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-api-key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-organization-id: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Idempotency-Key: c41d8e77-5d40-4a11-9e8b-2c9f4d1e7a03\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"records\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\": \"ALB-2026-09-0001\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"facility_percentages\": [{ \"facility_id\": \"660e8400-e29b-41d4-a716-446655440000\", \"percentage\": 1 }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identification_name\": \"ALB-2026-09-0001\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\": \"2026-09-01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\": \"2026-09-30\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"base_quantity\": 1250.5,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"unit_id\": \"61743a63-ff70-459c-9567-5eee8f7dfd5c\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"waste_ler_code_id\": \"33d3e986-2e02-4aaa-8be0-708c143c02d9\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`29`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`29`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` uuid`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/wastes\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"x-api-key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"DCYCLE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"x-organization-id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"DCYCLE_ORG_ID\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`str`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(uuid.uuid4()), `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# keep it to retry this same batch`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` json`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"records\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"facility_percentages\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"facility_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"660e8400-e29b-41d4-a716-446655440000\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"percentage\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identification_name\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-30\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"base_quantity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1250.5`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"unit_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"waste_ler_code_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"33d3e986-2e02-4aaa-8be0-708c143c02d9\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` timeout`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`60`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(response.status_code, response.headers[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Location\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`])`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`24`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` axios`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` require`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'axios'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` require`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'crypto'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` response`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` axios.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`post`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'https://api.dcycle.io/v2/wastes'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` records: [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` client_row_id: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'ALB-2026-09-0001'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` facility_percentages: [{ facility_id: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'660e8400-e29b-41d4-a716-446655440000'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, percentage: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` identification_name: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'ALB-2026-09-0001'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` start_date: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'2026-09-01'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` end_date: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'2026-09-30'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` base_quantity: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1250.5`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` unit_id: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'61743a63-ff70-459c-9567-5eee8f7dfd5c'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` waste_ler_code_id: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'33d3e986-2e02-4aaa-8be0-708c143c02d9'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}, {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'x-api-key'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'x-organization-id'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'Idempotency-Key'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(), `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// keep it to retry this same batch`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(response.status, response.headers.location);`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`202`,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"processing\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"entity_type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"wastes\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"operation\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"create\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"api_bulk\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"counts\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"submitted\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"succeeded\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"chunks_total\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"chunks_done\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-29T10:15:02.184Z\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"finished_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"links\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"self\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"items\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa/items\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`422`,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Unprocessable Entity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`422`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"1 of the submitted records are invalid; nothing was written.\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"REFERENCE_NOT_FOUND\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"field\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"waste_ler_code_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"0f0e0d0c-0000-4000-8000-000000000000\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"rejected\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`200 (dry_run=true)`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"dry_run\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`true`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"submitted\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"valid\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`what-is-a-waste`,children:`What is a waste`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`waste`}),` is a quantity of residue that one of your facilities generates and hands over to a manager, who\ntransports it to a treatment plant. Both steps emit greenhouse gases:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Treatment:`}),` landfilling, incineration, recycling, composting… Each treatment of each type of waste has its own\nemission factor.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Transport`}),` to the waste center: calculated from `,_jsx(_components.code,{children:`total_km_to_waste_center`}),`. It is optional: a waste sent\nwithout a distance has no transport emissions (see `,_jsx(_components.a,{href:`#how-the-emissions-are-calculated`,children:`How the emissions are calculated`}),`).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`These emissions are reported under `,_jsx(_components.strong,{children:`Scope 3, Category 5 (waste generated in operations)`}),` of the\n`,_jsx(_components.a,{href:`https://ghgprotocol.org/sites/default/files/2022-12/Chapter5.pdf`,children:`GHG Protocol`}),`.`]}),`\n`,_jsx(_components.p,{children:`A waste record is characterized by:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What`}),_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Where it was generated`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`facility_percentages`})}),_jsxs(_components.td,{children:[`Each facility inside your `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),` and its share. A whole waste of one facility is `,_jsx(_components.code,{children:`[{facility_id, percentage: 1}]`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`When`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`start_date`}),`, `,_jsx(_components.code,{children:`end_date`})]}),_jsxs(_components.td,{children:[`The period the waste belongs to, usually that of a collection by the waste manager. A collection with a single date sends it as both `,_jsx(_components.code,{children:`start_date`}),` and `,_jsx(_components.code,{children:`end_date`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`How much`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`base_quantity`}),`, `,_jsx(_components.code,{children:`unit_id`})]}),_jsxs(_components.td,{children:[`In kilograms or tonnes, e.g. 1,250.5 kg, or 1.25 t for 1,250 kg. In tonnes, up to 3 decimals (1 kg); send a finer quantity in kilograms. Another unit needs your own emission factor in that unit (see `,_jsx(_components.code,{children:`unit_id`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`What type of waste`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`waste_ler_code_id`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`LER`}),` code (European List of Waste, Commission Decision 2000/532/EC): six digits with no spaces, e.g. `,_jsx(_components.code,{children:`150106`}),` mixed packaging; a trailing asterisk marks hazardous waste (`,_jsx(_components.code,{children:`130205*`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`How it is treated`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`waste_rd_code_id`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`R/D`}),` code: a recovery (`,_jsx(_components.code,{children:`R…`}),`) or disposal (`,_jsx(_components.code,{children:`D…`}),`) operation from Annexes I and II of the Waste Framework Directive 2008/98/EC, plus `,_jsx(_components.code,{children:`R14`}),` (preparation for reuse), written with two digits as the catalog returns it. E.g. `,_jsx(_components.code,{children:`R03`}),` recycling of organic substances, `,_jsx(_components.code,{children:`D01`}),` landfill. `,_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:`List R/D Codes`}),` has the ones Dcycle accepts.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Who manages it`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`provider_name`}),`, `,_jsx(_components.code,{children:`transporter_name`}),`, `,_jsx(_components.code,{children:`destination`})]}),_jsx(_components.td,{children:`The waste manager, the carrier and the treatment plant.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`how-the-emissions-are-calculated`,children:`How the emissions are calculated`}),`\n`,_jsxs(_components.p,{children:[`Emissions are the quantity multiplied by an emission factor. What you send determines `,_jsx(_components.strong,{children:`how Dcycle finds that\nfactor`}),`. Only when you bring your own factor do you choose it.`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`LER code (and R/D code when you have it):`}),` the standard route. The codes classify the waste in a common\nterminology, and Dcycle looks up the factor mapped to that LER + R/D pair in its emission factor databases: DEFRA\nby default, OCCC when DEFRA does not cover the code. With the LER code alone, Dcycle uses DEFRA’s landfill factor\nfor its material (its combustion factor where DEFRA publishes no landfill one), the conservative choice when the\ntreatment is unknown, or, for a code DEFRA does not cover, OCCC’s average across treatments for its waste\nfraction. A recovery treatment usually has a lower factor, so send the R/D code whenever you know it.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`No codes, only a `,_jsx(_components.code,{children:`description`}),`:`]}),` Dcycle compares the description with the factors of its maintained emission\nfactor databases and selects the closest one for each year of the waste period. No LER or R/D code is assigned to\nthe record. A low-confidence match is still applied and counts; the waste is flagged so someone confirms the\nfactor. Use it when your source data has no LER code.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Your own factor, `,_jsx(_components.code,{children:`custom_ef_record_id`}),`:`]}),` the only route where you choose the factor. The id of a\n`,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/overview`,children:`custom emission factor record`}),` you created beforehand in a custom\nemission factor database of your organization, with `,_jsx(_components.code,{children:`wastes`}),` among its activity categories. Use it when you have a\nfactor measured or provided by your waste manager. No LER code is needed; if you send one as well, your factor\ntakes precedence. See `,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/create-record`,children:`Create Custom Record`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A record needs at least one of the three. If Dcycle cannot find a factor (the code pair is not covered, or no factor\ncan be applied from the description), the waste is still stored and its calculation ends as `,_jsx(_components.code,{children:`CALCULATION_FAILED`}),` in\nthe job’s items.`]}),`\n`,_jsx(_components.p,{children:`Each year of the waste period is priced with that year’s edition of the database, or with its latest edition for a\nyear it has no edition of. A period that spans several years is split between them in proportion to its days.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Transport`}),` to the waste center is calculated only when `,_jsx(_components.code,{children:`total_km_to_waste_center`}),` is greater than 0. A waste in a\nweight unit is priced in tonne-kilometres (its quantity in tonnes × the distance); a waste in a volume (m3), per\nvehicle-kilometre. The freight factor is DEFRA’s heavy goods vehicle factor by default; another source, such as\necoinvent, is chosen in the Dcycle app, in the emission factors panel.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Sent with a description?`}),` A factor applied with low confidence counts like any other: the waste ends\n`,_jsx(_components.code,{children:`uploaded`}),`, with its emissions and `,_jsx(_components.code,{children:`LOW_CONFIDENCE_WASTE_FACTOR_MATCH`}),` in `,_jsx(_components.code,{children:`error_messages`}),`\n(`,_jsx(_components.a,{href:`/api-reference/wastes/get`,children:_jsx(_components.code,{children:`GET /v1/wastes/{waste_id}/detail`})}),`), and its job item is `,_jsx(_components.code,{children:`succeeded`}),`. Confirm the\nfactor in the Dcycle app. When no factor could be applied, the waste stays `,_jsx(_components.code,{children:`status: \"review\"`}),`, without emissions\nuntil someone picks a factor in the app, and its job item is `,_jsx(_components.code,{children:`failed`}),` with `,_jsx(_components.code,{children:`CALCULATION_FAILED`}),`. A description that\nnames a material but no treatment is calculated with the database’s default treatment for that material, with\n`,_jsx(_components.code,{children:`WASTE_DEFAULT_TREATMENT_ASSUMED`}),` in `,_jsx(_components.code,{children:`error_messages`}),`. To calculate the real treatment, name it in the `,_jsx(_components.code,{children:`description`}),`\n(e.g. “recycling”, “landfill”) or send the LER code with its R/D code (`,_jsx(_components.code,{children:`waste_ler_code_id`}),` and `,_jsx(_components.code,{children:`waste_rd_code_id`}),`):\nan R/D code without a LER code is not used.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`find-the-ids-you-send`,children:`Find the ids you send`}),`\n`,_jsx(_components.p,{children:`A record does not carry your own codes: every reference is a Dcycle id (UUID). Look them up once and keep the\nmapping on your side; the catalogs rarely change. The ids of the LER, R/D and unit catalogs are the same in every\nDcycle environment, so the ones in these examples work as they are.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Where to find it`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`facility_percentages[].facility_id`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/api-reference/facilities/list`,children:_jsx(_components.code,{children:`GET /v1/facilities`})}),`: the facilities of your organization; add `,_jsx(_components.code,{children:`consolidate_group=true`}),` to include those of its subsidiaries.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unit_id`})}),_jsxs(_components.td,{children:[`Kilograms `,_jsx(_components.code,{children:`61743a63-ff70-459c-9567-5eee8f7dfd5c`}),` or tonnes `,_jsx(_components.code,{children:`cab66828-c2b1-431b-92af-f9ab37149d3c`}),`, the units `,_jsx(_components.a,{href:`/api-reference/units/list`,children:_jsx(_components.code,{children:`GET /v2/units?type=wastes`})}),` lists. Any other unit needs a `,_jsx(_components.code,{children:`custom_ef_record_id`}),` whose factor is per that unit; a per-m3 factor takes m3 only.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`waste_ler_code_id`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/api-reference/wastes/ler-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/ler-codes?search=150106`})}),`: the `,_jsx(_components.code,{children:`id`}),` of the LER code. The catalog is the same for every organization.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`waste_rd_code_id`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/rd-codes?ler_code_id=…`})}),`: scoped to the LER code, it lists only the treatments that have an emission factor for it.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`custom_ef_record_id`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/api-reference/custom-emission-factors/list-records`,children:`List Custom Records`}),`, only when you bring your own factor.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`You send a list of records (`,_jsx(_components.code,{children:`records`}),`), one object per waste.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`All or nothing:`}),` every record is validated. If `,_jsx(_components.strong,{children:`any`}),` record is invalid, the whole request is rejected with\n`,_jsx(_components.code,{children:`422 BULK_RECORDS_REJECTED`}),` and `,_jsx(_components.strong,{children:`nothing is written`}),`: `,_jsx(_components.code,{children:`rejected`}),` is the number of invalid records and `,_jsx(_components.code,{children:`errors`}),`\nlists them (up to 100). Fix them and resend the full batch.`]}),`\n`,_jsxs(_components.li,{children:[`If every record is valid, all wastes are written in one transaction and the API answers `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`202 Accepted`})}),` with the\ningest job and a `,_jsx(_components.code,{children:`Location`}),` header pointing at it.`]}),`\n`,_jsxs(_components.li,{children:[`A worker calculates the emissions in chunks of 100 records. Poll\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{job_id}`})}),` until `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`completed`}),` or\n`,_jsx(_components.code,{children:`completed_with_errors`}),`, then read the per-record outcomes at\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/list-items`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{job_id}/items`})}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`When every chunk is done`}),`, a job submitted with an API key also sends\n`,_jsx(_components.a,{href:`/api-reference/webhooks/overview`,children:_jsx(_components.code,{children:`ingest_job.finished`})}),` to your webhook endpoints, so you can wait for it instead\nof polling. (A batch sent by someone signed in to Dcycle notifies them in the app instead.)`]}),`\n`]}),`\n`,_jsx(Mermaid,{chart:`sequenceDiagram\n participant C as Client\n participant A as Dcycle API\n participant W as Worker\n C->>A: POST /v2/wastes {records: [...]}\n alt any record invalid\n A-->>C: 422 BULK_RECORDS_REJECTED (invalid records counted, up to 100 listed)\n else all records valid\n A->>A: write wastes + job + ledger (one transaction)\n A-->>C: 202 Accepted, Location: /v2/ingest-jobs/{id}, status \"processing\"\n loop per chunk of 100 records\n W->>W: calculate emissions\n end\n W-->>C: webhook ingest_job.finished (API key requests)\n C->>A: GET /v2/ingest-jobs/{id}\n A-->>C: status \"completed\" | \"completed_with_errors\"\n end`}),`\n`,_jsx(Heading,{level:`2`,id:`one-waste-or-many`,children:`One waste or many`}),`\n`,_jsxs(_components.p,{children:[`The same request creates one waste or a whole batch. To create a single waste, send `,_jsx(_components.code,{children:`records`}),` with one element; it\ngoes through the same validation, the same job and the same calculation as a batch. For more than 5,000 records,\nsplit them into several requests (see `,_jsx(_components.a,{href:`#limits`,children:`Limits`}),`).`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsxs(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:[_jsxs(_components.p,{children:[`Your API key (see `,_jsx(_components.a,{href:`/api-reference/introduction#authentication`,children:`Authentication`}),`).`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:\"${DCYCLE_API_KEY}\"})]})]}),`\n`,_jsxs(ParamField,{header:`x-organization-id`,type:`string`,required:true,id:`param-x-organization-id`,children:[_jsxs(_components.p,{children:[`UUID of the organization the wastes are created for: in Dcycle, `,_jsx(_components.strong,{children:`Company settings → Organization info`}),`, click\n`,_jsx(_components.strong,{children:`Copy organization ID`}),` (`,_jsx(_components.a,{href:`/docs/authentication#get-an-api-key`,children:`Get an API Key`}),`). Every facility of its\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),` (the organization and its accepted, enabled\nsubsidiaries) is a valid destination.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`a8315ef3-dd50-43f8-b7ce-d839e68d51fa`})]})]}),`\n`,_jsx(ParamField,{header:`Content-Type`,type:`string`,required:true,id:`param-content-type`,children:_jsxs(_components.p,{children:[`Must be `,_jsx(_components.code,{children:`application/json`})]})}),`\n`,_jsxs(ParamField,{header:`Idempotency-Key`,type:`string`,required:true,id:`param-idempotency-key`,children:[_jsxs(_components.p,{children:[`1 to 255 characters. Send one key per batch (a UUID works well); it is looked up per organization across every v2\nbulk route (wastes, facilities, invoices…). Within 24 hours, the same key with the same route and body returns\n`,_jsx(_components.strong,{children:`that same job`}),` (with `,_jsx(_components.code,{children:`Idempotent-Replayed: true`}),`) instead of creating the wastes again, so a timeout or network\nerror can be retried safely. The same key with a `,_jsx(_components.strong,{children:`different`}),` body or on another route is rejected with\n`,_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`: use a new key for a new batch. A retry that arrives while the first request is still\nbeing processed gets `,_jsx(_components.code,{children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`. After 24 hours the key is free and a request with it is a\nnew one, so retry within that window. See\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#the-idempotency-key`,children:`The Idempotency-Key`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`c41d8e77-5d40-4a11-9e8b-2c9f4d1e7a03`})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsx(ParamField,{query:`dry_run`,type:`boolean`,default:`false`,id:`param-dry-run`,children:_jsxs(_components.p,{children:[`Validate only. The record checks run without writing: an invalid batch answers the same `,_jsx(_components.code,{children:`422`}),`, `,_jsx(_components.strong,{children:`nothing is\nwritten`}),` and no job is created; a valid batch answers `,_jsx(_components.code,{children:`200`}),` with `,_jsx(_components.code,{children:`{\"dry_run\": true, \"submitted\": n, \"valid\": n}`}),`.\nUse it to test an integration without creating data. The `,_jsx(_components.code,{children:`Idempotency-Key`}),` header is still required, but a dry\nrun does not check or store it, so you can send the real request with the same key afterwards. See\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#dry-run`,children:`Dry run`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsxs(ParamField,{body:`records`,type:`array[object]`,required:true,id:`param-records`,children:[_jsxs(_components.p,{children:[`The wastes to create: between 1 and 5,000 objects. Each record has the fields below; a field it does not\ndeclare (a typo, or `,_jsx(_components.code,{children:`facility_id`}),`) rejects the record with `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`.`]}),_jsxs(Expandable,{title:`record fields`,children:[_jsxs(ParamField,{body:`facility_percentages`,type:`array[object]`,required:true,id:`param-facility-percentages`,children:[_jsxs(_components.p,{children:[`The facilities the waste belongs to and each one’s share, as in `,_jsx(_components.a,{href:`/api-reference/invoices/overview`,children:`invoices v2`}),`.\nOne waste is created per entry, with `,_jsx(_components.code,{children:`quantity = base_quantity × percentage`}),`; each waste’s `,_jsx(_components.code,{children:`quantity`}),` is\nstored with 3 decimals (2 t at 0.3333 gives 0.667 t). A whole waste of one facility is `,_jsx(_components.code,{children:`[{facility_id, percentage: 1}]`}),`. Each\nfacility once, all inside your `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),`, and the percentages add up to 1 at most; under 1,\nthe rest of the waste is not counted. Facility ids come from\n`,_jsx(_components.a,{href:`/api-reference/facilities/list`,children:_jsx(_components.code,{children:`GET /v1/facilities`})}),`.`]}),_jsxs(Expandable,{title:`entry fields (only these two)`,children:[_jsx(ParamField,{body:`facility_id`,type:`uuid`,required:true,id:`param-facility-id`,children:_jsx(_components.p,{children:`UUID of the facility receiving this share.`})}),_jsxs(ParamField,{body:`percentage`,type:`number`,required:true,id:`param-percentage`,children:[_jsx(_components.p,{children:`Fraction of the quantity, greater than 0 and at most 1.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`0.6`})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`[{\"facility_id\": \"660e8400-e29b-41d4-a716-446655440000\", \"percentage\": 1}]`})]})]}),_jsxs(ParamField,{body:`identification_name`,type:`string`,required:true,id:`param-identification-name`,children:[_jsx(_components.p,{children:`Waste identification name or invoice/delivery-note number.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"ALB-2026-09-0001\"`})]})]}),_jsxs(ParamField,{body:`start_date`,type:`date`,required:true,id:`param-start-date`,children:[_jsxs(_components.p,{children:[`Start of the waste period (ISO 8601), from 1970 to `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#activity-dates`,children:`tomorrow in UTC at the latest`}),`. Send the period of each collection by the\nwaste manager as your data has it; a collection with a single date sends it as both `,_jsx(_components.code,{children:`start_date`}),` and\n`,_jsx(_components.code,{children:`end_date`}),`. A period that spans several years is split between them in proportion to its days.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"2026-09-01\"`})]})]}),_jsxs(ParamField,{body:`end_date`,type:`date`,required:true,id:`param-end-date`,children:[_jsxs(_components.p,{children:[`End of the waste period (ISO 8601), on or after `,_jsx(_components.code,{children:`start_date`}),`, `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#activity-dates`,children:`tomorrow in UTC at the latest`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"2026-09-30\"`})]})]}),_jsxs(ParamField,{body:`base_quantity`,type:`number`,required:true,id:`param-base-quantity`,children:[_jsxs(_components.p,{children:[`Quantity of waste in `,_jsx(_components.code,{children:`unit_id`}),`. Must be greater than 0. It is stored with 3 decimals. In tonnes, send at most 3\n(0.001 t is 1 kg): a finer quantity, such as 1.2505 t, rejects the record with `,_jsx(_components.code,{children:`TOO_MANY_DECIMALS`}),`; send it in\nkilograms instead (1,250.5 kg). Floating-point noise, such as 0.21000000000000002 t, is taken as 0.21 t. In any\nother unit, a finer quantity is rounded to 3 decimals (to the gram in kilograms).`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`1250.5`})]})]}),_jsxs(ParamField,{body:`unit_id`,type:`uuid`,required:true,id:`param-unit-id`,children:[_jsxs(_components.p,{children:[`Kilograms `,_jsx(_components.code,{children:`61743a63-ff70-459c-9567-5eee8f7dfd5c`}),` or tonnes `,_jsx(_components.code,{children:`cab66828-c2b1-431b-92af-f9ab37149d3c`}),`, the units\n`,_jsx(_components.a,{href:`/api-reference/units/list`,children:_jsx(_components.code,{children:`GET /v2/units?type=wastes`})}),` lists. A quantity in a unit other than that of the\nemission factor applied (per tonne in DEFRA, the default database) is converted to it, and the calculation detail\nin the app shows that step. Any unit other than kilograms or tonnes is supported only with your own emission\nfactor: a waste\npriced with a `,_jsx(_components.code,{children:`custom_ef_record_id`}),` may use the unit of that record, the one its factor is per; when that unit\nis not a weight (m3), only it, since kilograms and tonnes cannot be converted to it. The Dcycle app offers custom factors for\nwastes per kilogram or per cubic metre (`,_jsx(_components.a,{href:`/api-reference/units/list`,children:_jsx(_components.code,{children:`GET /v2/units?type=custom_emission_factors_wastes`})}),`):\nsend a volume in m3 (litres ÷1,000) with a per-m3 factor. A custom factor in another unit works the same way: a\nweight unit lets the waste use kilograms, tonnes or that unit, and any other unit only itself. A record without\na unit is rejected with `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`, and one with any other unit with `,_jsx(_components.code,{children:`UNIT_NOT_SUPPORTED`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`})]})]}),_jsxs(ParamField,{body:`waste_ler_code_id`,type:`uuid`,id:`param-waste-ler-code-id`,children:[_jsxs(_components.p,{children:[`UUID of the LER (European List of Waste) code, taken from\n`,_jsx(_components.a,{href:`/api-reference/wastes/ler-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/ler-codes`})}),`. Required unless you send a `,_jsx(_components.code,{children:`custom_ef_record_id`}),`,\nor a non-empty `,_jsx(_components.code,{children:`description`}),` (then the description is matched to a waste type automatically before the\ncalculation).`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"33d3e986-2e02-4aaa-8be0-708c143c02d9\"`}),` (`,_jsx(_components.code,{children:`150106`}),`, mixed packaging)`]})]}),_jsxs(ParamField,{body:`waste_rd_code_id`,type:`uuid`,id:`param-waste-rd-code-id`,children:[_jsxs(_components.p,{children:[`UUID of the R/D (recovery/disposal) treatment code, taken from\n`,_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/rd-codes?ler_code_id=…`})}),`, which lists the treatments with an\nemission factor for that LER code. Optional, but send it when you know the treatment: without it Dcycle prices\nthe waste with a conservative default factor (see `,_jsx(_components.a,{href:`#how-the-emissions-are-calculated`,children:`How the emissions are calculated`}),`).`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"6617caab-9db0-40df-8716-54d8c94e8056\"`}),` (`,_jsx(_components.code,{children:`R03`}),`)`]})]}),_jsxs(ParamField,{body:`description`,type:`string`,default:``,id:`param-description`,children:[_jsxs(_components.p,{children:[`Description of the waste. Required (non-empty) when `,_jsx(_components.code,{children:`waste_ler_code_id`}),` is omitted.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"Mezcla de envases ligeros\"`})]})]}),_jsxs(ParamField,{body:`destination`,type:`string`,default:``,id:`param-destination`,children:[_jsx(_components.p,{children:`Waste destination or treatment facility.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"Centro de tratamiento Ecoveza\"`})]})]}),_jsxs(ParamField,{body:`provider_name`,type:`string | null`,id:`param-provider-name`,children:[_jsx(_components.p,{children:`Business name of the waste manager that treats the waste.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"Ecoveza S.L.\"`})]})]}),_jsxs(ParamField,{body:`transporter_name`,type:`string | null`,id:`param-transporter-name`,children:[_jsx(_components.p,{children:`Business name of the carrier that takes the waste to the treatment plant, when it is not the waste manager.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"Transportes Levante S.L.\"`})]})]}),_jsxs(ParamField,{body:`total_km_to_waste_center`,type:`number`,default:`0`,id:`param-total-km-to-waste-center`,children:[_jsxs(_components.p,{children:[`Distance to the waste center in km, used to calculate collection transport emissions. Optional: with `,_jsx(_components.code,{children:`0`}),`, the\ndefault, the waste has no transport emissions. How the distance is priced is in\n`,_jsx(_components.a,{href:`#how-the-emissions-are-calculated`,children:`How the emissions are calculated`}),`. From 0 to 500,000.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`42`})]})]}),_jsxs(ParamField,{body:`custom_ef_record_id`,type:`uuid | null`,id:`param-custom-ef-record-id`,children:[_jsxs(_components.p,{children:[`UUID of one of your `,_jsx(_components.a,{href:`/api-reference/custom-emission-factors/overview`,children:`custom emission factor records`}),`, to\ncalculate this waste with your own factor instead of the standard databases. The record must be visible to the organization of the first facility in\n`,_jsx(_components.code,{children:`facility_percentages`}),` (the one that owns the waste), enabled, and configured for the `,_jsx(_components.code,{children:`wastes`}),` activity category. With it, `,_jsx(_components.code,{children:`waste_ler_code_id`}),` is optional. In a\nsplit (`,_jsx(_components.code,{children:`facility_percentages`}),`), every resulting waste uses the same factor.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"c3d4e5f6-a7b8-9012-cdef-ab3456789012\"`})]})]}),_jsx(ParamField,{body:`file_url`,type:`string | null`,id:`param-file-url`,children:_jsxs(_components.p,{children:[`URL of a supporting document (e.g. a waste manifest), or the document itself as a base64 data URI\n(`,_jsx(_components.code,{children:`data:\u003cmime>;base64,...`}),`), which is uploaded and stored as a URL. A data URI that is not valid base64 rejects\nthe record with `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`.`]})}),_jsx(ParamField,{body:`file_name`,type:`string | null`,id:`param-file-name`,children:_jsxs(_components.p,{children:[`Original name of the attached document (e.g. `,_jsx(_components.code,{children:`manifest.xlsx`}),`), up to 255 characters.`]})}),_jsxs(ParamField,{body:`file_id`,type:`uuid | null`,id:`param-file-id`,children:[_jsxs(_components.p,{children:[`UUID of a file of your `,_jsx(_components.a,{href:`/api-reference/files/upload`,children:`files`}),` to attach as the supporting document, instead of\nsending it inline in `,_jsx(_components.code,{children:`file_url`}),`: upload it first (`,_jsx(_components.code,{children:`POST /v1/files/presigned-urls`}),` with `,_jsx(_components.code,{children:`skip_processing: true`}),` so it is\nstored without being read, the upload, then `,_jsx(_components.code,{children:`PATCH /v1/files/batch-update`}),` to `,_jsx(_components.code,{children:`uploaded`}),`). The waste stores the file’s URL and its name with extension as `,_jsx(_components.code,{children:`file_url`}),` and `,_jsx(_components.code,{children:`file_name`}),` (both\nsent are ignored). The file must be `,_jsx(_components.code,{children:`uploaded`}),` and belong to your organization or one you can write to; any\nother id rejects the record with `,_jsx(_components.code,{children:`REFERENCE_NOT_FOUND`}),` (`,_jsx(_components.code,{children:`field: \"file_id\"`}),`). Sent together with a data URI in\n`,_jsx(_components.code,{children:`file_url`}),`, the record is rejected with `,_jsx(_components.code,{children:`SCHEMA_INVALID`}),`. In a split, every resulting waste links the same file.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"7c9e6679-7425-40de-944b-e07fc1f90ae7\"`})]})]}),_jsxs(ParamField,{body:`attachment_file_id`,type:`uuid | null`,id:`param-attachment-file-id`,children:[_jsxs(_components.p,{children:[`UUID of a file of your `,_jsx(_components.a,{href:`/api-reference/files/upload`,children:`files`}),` to attach to the waste as its supporting document\n(e.g. the waste manifest), uploaded as for `,_jsx(_components.code,{children:`file_id`}),`. Unlike `,_jsx(_components.code,{children:`file_id`}),`, the waste keeps it apart from the file it\nwas read from, and reads it back in `,_jsx(_components.code,{children:`attachment`}),` of `,_jsx(_components.a,{href:`/api-reference/wastes/get`,children:`Get Waste`}),`. The file must be\n`,_jsx(_components.code,{children:`uploaded`}),` and belong to your organization or one you can write to, and a private file only to the organization\nof every facility; any other id rejects the record with `,_jsx(_components.code,{children:`REFERENCE_NOT_FOUND`}),` (`,_jsx(_components.code,{children:`field: \"attachment_file_id\"`}),`). In\na split, every resulting waste takes it.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"7c9e6679-7425-40de-944b-e07fc1f90ae7\"`})]})]}),_jsxs(ParamField,{body:`client_row_id`,type:`string | null`,id:`param-client-row-id`,children:[_jsx(_components.p,{children:`Your own identifier for the record, up to 255 characters. It is echoed on every outcome for this record (in\nrejections and in the job’s items), so you can correlate results without tracking array positions.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example:`}),` `,_jsx(_components.code,{children:`\"ALB-2026-09-0001\"`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`202-accepted`,children:`202 Accepted`}),`\n`,_jsxs(_components.p,{children:[`Every record passed validation and was stored. The body is the ingest job; the `,_jsx(_components.code,{children:`Location`}),` header holds its path.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`/`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1.1`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` 202`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` Accepted`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#85E89D`},children:`Location`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` /v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"processing\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"entity_type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"wastes\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"operation\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"create\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"api_bulk\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"counts\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"submitted\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`250`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"succeeded\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"chunks_total\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`3`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"chunks_done\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-29T10:15:02.184Z\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"finished_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"links\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"self\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"items\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa/items\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsx(ResponseField,{name:`id`,type:`uuid`,id:`param-id`,children:_jsxs(_components.p,{children:[`Ingest job id. Use it with `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.code,{children:`GET /v2/ingest-jobs/{job_id}`})}),`.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`processing`}),` right after the request. See `,_jsx(_components.a,{href:`#job-status`,children:`Job status`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`entity_type`,type:`string`,id:`param-entity-type`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`wastes`}),` for this endpoint.`]})}),`\n`,_jsx(ResponseField,{name:`operation`,type:`string`,id:`param-operation`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`create`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`source`,type:`string`,id:`param-source`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`api_bulk`}),` when sent with an API key; `,_jsx(_components.code,{children:`app`}),` when sent by a person signed in to Dcycle (e.g. the app’s waste form).`]})}),`\n`,_jsx(ResponseField,{name:`counts`,type:`object`,id:`param-counts`,children:_jsxs(Expandable,{title:`fields`,children:[_jsx(ResponseField,{name:`submitted`,type:`integer`,id:`param-submitted`,children:`Records in the request. All of them were stored.`}),_jsx(ResponseField,{name:`succeeded`,type:`integer`,id:`param-succeeded`,children:`Records whose emissions have been calculated.`}),_jsx(ResponseField,{name:`failed`,type:`integer`,id:`param-failed`,children:_jsx(_components.p,{children:`Records whose calculation failed. The waste exists but has no emissions; the job’s items say which ones.`})})]})}),`\n`,_jsx(ResponseField,{name:`chunks_total`,type:`integer`,id:`param-chunks-total`,children:_jsx(_components.p,{children:`Number of calculation chunks (100 records each).`})}),`\n`,_jsx(ResponseField,{name:`chunks_done`,type:`integer`,id:`param-chunks-done`,children:_jsxs(_components.p,{children:[`Chunks already calculated. `,_jsx(_components.code,{children:`chunks_done / chunks_total`}),` is the job’s progress.`]})}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`datetime`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the job was created (UTC).`})}),`\n`,_jsx(ResponseField,{name:`finished_at`,type:`datetime | null`,id:`param-finished-at`,children:_jsxs(_components.p,{children:[`When the last chunk finished (UTC), `,_jsx(_components.code,{children:`null`}),` while the job is processing.`]})}),`\n`,_jsx(ResponseField,{name:`links`,type:`object`,id:`param-links`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`self`}),`: the job. `,_jsx(_components.code,{children:`items`}),`: its per-record outcomes.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`job-status`,children:`Job status`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`processing`})}),_jsx(_components.td,{children:`Wastes are stored; emissions are being calculated.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed`})}),_jsx(_components.td,{children:`Every record was calculated.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed_with_errors`})}),_jsxs(_components.td,{children:[`Every chunk ran, and at least one record failed to calculate (`,_jsx(_components.code,{children:`counts.failed > 0`}),`). The other records are calculated normally.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`While a job is `,_jsx(_components.code,{children:`processing`}),`, the new wastes already exist without emissions (`,_jsx(_components.code,{children:`co2e`}),` is `,_jsx(_components.code,{children:`null`}),`); the value is filled in\nwhen their chunk is calculated. Each record’s waste id is its `,_jsx(_components.code,{children:`entity_id`}),` in the\n`,_jsx(_components.a,{href:`/api-reference/ingest-jobs/list-items`,children:`job’s items`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`chunks_done`}),` stops moving, see `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/get#a-job-that-does-not-finish`,children:`A job that does not finish`}),`:\nnever resend the batch with a new `,_jsx(_components.code,{children:`Idempotency-Key`}),`, because its wastes are already stored.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`why-a-record-failed-to-calculate`,children:`Why a record failed to calculate`}),`\n`,_jsxs(_components.p,{children:[`A failed item carries `,_jsx(_components.code,{children:`error_code: CALCULATION_FAILED`}),` with `,_jsx(_components.code,{children:`error_params: null`}),`. For the reason, read the waste\nwith `,_jsx(_components.a,{href:`/api-reference/wastes/get`,children:_jsx(_components.code,{children:`GET /v1/wastes/{waste_id}/detail`})}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`status: \"error\"`}),`: no emission factor covers its LER/R/D pair. A pair missing from\n`,_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:_jsx(_components.code,{children:`GET /v1/wastes/rd-codes?ler_code_id=…`})}),` never has one; a listed pair usually does.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`status: \"review\"`}),`: it came with a `,_jsx(_components.code,{children:`description`}),` that matched no factor. It has no emissions until someone picks\nthe factor in Dcycle.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`Errors follow `,_jsx(_components.a,{href:`/api-reference/errors`,children:`RFC 9457 problem details`}),` (`,_jsx(_components.code,{children:`Content-Type: application/problem+json`}),`): a stable\n`,_jsx(_components.code,{children:`code`}),`, a human `,_jsx(_components.code,{children:`detail`}),`, `,_jsx(_components.code,{children:`errors`}),` when there is a list of problems, and the `,_jsx(_components.code,{children:`request_id`}),` to quote to support.`]}),`\n`,_jsx(Heading,{level:`3`,id:`422-bulk_records_rejected-—-invalid-records`,children:`422 BULK_RECORDS_REJECTED — invalid records`}),`\n`,_jsxs(_components.p,{children:[`At least one record is invalid. `,_jsx(_components.strong,{children:`Nothing was written.`}),` `,_jsx(_components.code,{children:`rejected`}),` is the number of invalid records and `,_jsx(_components.code,{children:`errors`}),`\nlists them (up to 100) in submission order, each with its position in `,_jsx(_components.code,{children:`records`}),` (`,_jsx(_components.code,{children:`source_row_index`}),`, starting at 0),\nyour `,_jsx(_components.code,{children:`client_row_id`}),` and a stable `,_jsx(_components.code,{children:`error_code`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Each record carries `,_jsx(_components.strong,{children:`one`}),` `,_jsx(_components.code,{children:`error_code`}),`: the first rule it breaks. A record with two problems shows the second one\nonly after you fix the first, so validate again with `,_jsx(_components.code,{children:`?dry_run=true`}),` before sending the batch. (`,_jsx(_components.code,{children:`SCHEMA_INVALID`}),` is\nthe exception inside a record: its `,_jsx(_components.code,{children:`error_params.errors`}),` lists all of the record’s schema problems, up to 10.)`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`33`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`33`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Unprocessable Entity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`422`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"3 of the submitted records are invalid; nothing was written.\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0002\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"REFERENCE_NOT_FOUND\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"field\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"facility_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"00000000-0000-0000-0000-00000000c0de\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`2`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0003\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"SCHEMA_INVALID\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"loc\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"base_quantity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"greater_than\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"msg\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Input should be greater than 0\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`4`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0005\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"UNIT_NOT_SUPPORTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"field\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"unit_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"54a709bf-79fe-4acb-ab85-5e1d7cd26eb4\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"supported\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"cab66828-c2b1-431b-92af-f9ab37149d3c\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"rejected\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`3`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`error_code`})}),_jsx(_components.th,{children:`Cause`}),_jsx(_components.th,{children:`Fix`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SCHEMA_INVALID`})}),_jsxs(_components.td,{children:[`The record does not match the record schema: a missing required field (`,_jsx(_components.code,{children:`unit_id`}),` and `,_jsx(_components.code,{children:`facility_percentages`}),` included), a field the record or one of its `,_jsx(_components.code,{children:`facility_percentages`}),` entries does not declare (`,_jsx(_components.code,{children:`extra_forbidden`}),`, e.g. a typo, `,_jsx(_components.code,{children:`facility_id`}),`, or `,_jsx(_components.code,{children:`organization_id`}),` in an entry), a wrong type, `,_jsx(_components.code,{children:`base_quantity`}),` ≤ 0, a date outside 1970 to next year (`,_jsx(_components.code,{children:`activity_date_out_of_range`}),`), a date after tomorrow in UTC (`,_jsx(_components.code,{children:`date_in_the_future`}),`), `,_jsx(_components.code,{children:`end_date`}),` before `,_jsx(_components.code,{children:`start_date`}),`, or the record is not a JSON object. `,_jsx(_components.code,{children:`error_params.errors`}),` lists each problem with its field (`,_jsx(_components.code,{children:`loc`}),`; empty when the problem spans fields, as with `,_jsx(_components.code,{children:`end_date`}),` before `,_jsx(_components.code,{children:`start_date`}),`).`]}),_jsx(_components.td,{children:`Correct the listed fields.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FACILITIES_MUST_BE_UNIQUE`})}),_jsxs(_components.td,{children:[`A facility appears twice in `,_jsx(_components.code,{children:`facility_percentages`}),`.`]}),_jsx(_components.td,{children:`List each facility once.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REFERENCE_NOT_FOUND`})}),_jsxs(_components.td,{children:[`An id the record references does not exist or is outside your `,_jsx(_components.a,{href:`/api-reference/ingest-jobs/overview#perimeter`,children:`perimeter`}),`: a facility (`,_jsx(_components.code,{children:`error_params.field`}),` is `,_jsx(_components.code,{children:`facility_id`}),`; a disabled facility too), `,_jsx(_components.code,{children:`waste_ler_code_id`}),` or `,_jsx(_components.code,{children:`waste_rd_code_id`}),`; or a `,_jsx(_components.code,{children:`file_id`}),` or `,_jsx(_components.code,{children:`attachment_file_id`}),` that is not an `,_jsx(_components.code,{children:`uploaded`}),` file you can attach to every facility’s organization. Both cases answer the same, so ids cannot be probed.`]}),_jsxs(_components.td,{children:[`Use an enabled facility of your organization or of one of its accepted, enabled subsidiaries, and take the codes from `,_jsx(_components.a,{href:`/api-reference/wastes/ler-codes`,children:`LER codes`}),` and `,_jsx(_components.a,{href:`/api-reference/wastes/rd-codes`,children:`R/D codes`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FACILITY_PERCENTAGES_INVALID`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`facility_percentages`}),` add up to more than 1 (beyond 0.0001).`]}),_jsx(_components.td,{children:`Make them add up to 1 or less.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WASTE_LER_OR_DESCRIPTION_REQUIRED`})}),_jsxs(_components.td,{children:[`None of `,_jsx(_components.code,{children:`waste_ler_code_id`}),`, `,_jsx(_components.code,{children:`custom_ef_record_id`}),` or a non-empty `,_jsx(_components.code,{children:`description`}),` was sent.`]}),_jsx(_components.td,{children:`Send one of them.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`UNIT_NOT_SUPPORTED`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`unit_id`}),` is neither kilograms, tonnes nor the unit of the record’s `,_jsx(_components.code,{children:`custom_ef_record_id`}),`, or, with a per-m3 factor, not m3. `,_jsx(_components.code,{children:`error_params.supported`}),` lists the accepted unit ids.`]}),_jsxs(_components.td,{children:[`Send the quantity in one of the units of `,_jsx(_components.code,{children:`error_params.supported`}),`: kilograms (`,_jsx(_components.code,{children:`61743a63-ff70-459c-9567-5eee8f7dfd5c`}),`) or tonnes (`,_jsx(_components.code,{children:`cab66828-c2b1-431b-92af-f9ab37149d3c`}),`), or m3 with a per-m3 factor. For another unit, price the waste with a `,_jsx(_components.code,{children:`custom_ef_record_id`}),` whose factor is per that unit.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`TOO_MANY_DECIMALS`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`base_quantity`}),` is in tonnes with more than 3 decimals, a precision finer than 1 kg. Floating-point noise in the last digits does not count: 0.21000000000000002 t is taken as 0.21 t. `,_jsx(_components.code,{children:`error_params`}),` has the `,_jsx(_components.code,{children:`field`}),` (`,_jsx(_components.code,{children:`base_quantity`}),`), the `,_jsx(_components.code,{children:`value`}),` sent and `,_jsx(_components.code,{children:`max_decimals`}),` (3).`]}),_jsxs(_components.td,{children:[`Send the quantity in kilograms (`,_jsx(_components.code,{children:`61743a63-ff70-459c-9567-5eee8f7dfd5c`}),`): 1.2505 t is 1,250.5 kg.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIDB_CUSTOM_RECORD_NOT_FOUND_OR_DISABLED`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`custom_ef_record_id`}),` does not exist, is disabled, or is not visible to the organization of the first facility in `,_jsx(_components.code,{children:`facility_percentages`}),`.`]}),_jsx(_components.td,{children:`Use an enabled record of that organization (or shared with it).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MULTIDB_CUSTOM_RECORD_INCOMPATIBLE_CATEGORY`})}),_jsxs(_components.td,{children:[`The custom emission factor record is not configured for the `,_jsx(_components.code,{children:`wastes`}),` activity category.`]}),_jsxs(_components.td,{children:[`Add `,_jsx(_components.code,{children:`wastes`}),` to the record’s activity categories.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`422-idempotency_key_reused`,children:`422 IDEMPOTENCY_KEY_REUSED`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`Idempotency-Key`}),` was used in this organization in the last 24 hours with a different body or on another route.\nNothing is written. Send a new key for a new batch; to retry the original batch, resend exactly the same body to the\nsame route (field order does not matter).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"https://code.dcycle.io/api-reference/errors#IDEMPOTENCY_KEY_REUSED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Unprocessable Entity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`422`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"IDEMPOTENCY_KEY_REUSED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"This Idempotency-Key was already used with a different request body or on another route. Use a new key per batch.\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`409-idempotency_key_in_progress`,children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`\n`,_jsxs(_components.p,{children:[`Another request with the same `,_jsx(_components.code,{children:`Idempotency-Key`}),` was still being processed, typically your own retry after a timeout.\nThis request wrote nothing. Wait the `,_jsx(_components.code,{children:`Retry-After`}),` seconds and retry with the same key and body: you get the job of\nthe request that went through. See `,_jsx(_components.a,{href:`/api-reference/errors#IDEMPOTENCY_KEY_IN_PROGRESS`,children:`IDEMPOTENCY_KEY_IN_PROGRESS`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`422-request_validation_failed-—-malformed-request`,children:`422 REQUEST_VALIDATION_FAILED — malformed request`}),`\n`,_jsxs(_components.p,{children:[`The request itself is invalid: the `,_jsx(_components.code,{children:`Idempotency-Key`}),` header is missing, or `,_jsx(_components.code,{children:`records`}),` is missing, empty or has more\nthan 5,000 entries. `,_jsx(_components.code,{children:`errors`}),` lists each problem with where it is (`,_jsx(_components.code,{children:`loc`}),`):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"https://code.dcycle.io/api-reference/errors#REQUEST_VALIDATION_FAILED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Unprocessable Entity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`422`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"REQUEST_VALIDATION_FAILED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:'\"The request is invalid (1 error(s)); see `errors`.\"'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"loc\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"header\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"msg\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"field required\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"value_error.missing\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`401-400-and-403-key-and-organization`,children:`401, 400 and 403: key and organization`}),`\n`,_jsxs(_components.p,{children:[`Before the records are looked at, the API key and the organization are checked. Each code has its section in\n`,_jsx(_components.a,{href:`/api-reference/errors#codes`,children:`Errors`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`401`}),`: no API key (`,_jsx(_components.code,{children:`AUTHENTICATION_REQUIRED`}),`), a wrong or revoked one (`,_jsx(_components.code,{children:`INVALID_API_KEY`}),`), an expired one\n(`,_jsx(_components.code,{children:`API_KEY_EXPIRED`}),`), a key of another organization (`,_jsx(_components.code,{children:`API_KEY_ORG_MISMATCH`}),`) or one too old to have an owner\n(`,_jsx(_components.code,{children:`API_KEY_NO_OWNER`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`400 ORGANIZATION_ID_REQUIRED`}),`: no `,_jsx(_components.code,{children:`x-organization-id`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`403`}),`: the key’s creator is not a member of the organization in `,_jsx(_components.code,{children:`x-organization-id`}),` (`,_jsx(_components.code,{children:`LOGGED_USER_NOT_MEMBER`}),`),\nthe key is read-only (`,_jsx(_components.code,{children:`API_KEY_SCOPE_DENIED`}),`), or its creator is a Viewer (`,_jsx(_components.code,{children:`VIEWER_CANNOT_WRITE`}),`).`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`429-too_many_requests`,children:`429 TOO_MANY_REQUESTS`}),`\n`,_jsxs(_components.p,{children:[`The API key, or its IP, sent more requests than the `,_jsx(_components.a,{href:`/api-reference/rate-limits`,children:`rate limits`}),` allow. Nothing was\nwritten: wait the `,_jsx(_components.code,{children:`Retry-After`}),` seconds and send the same request again, with the same `,_jsx(_components.code,{children:`Idempotency-Key`}),`. See\n`,_jsx(_components.a,{href:`/api-reference/errors#TOO_MANY_REQUESTS`,children:`TOO_MANY_REQUESTS`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`create-a-batch-and-wait-for-the-calculation`,children:`Create a batch and wait for the calculation`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`37`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`37`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -i`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/wastes\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-api-key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-organization-id: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`)\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"records\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\": \"ALB-2026-09-0001\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"facility_percentages\": [{ \"facility_id\": \"660e8400-e29b-41d4-a716-446655440000\", \"percentage\": 1 }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identification_name\": \"ALB-2026-09-0001\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\": \"2026-09-01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\": \"2026-09-30\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"base_quantity\": 1250.5,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"unit_id\": \"61743a63-ff70-459c-9567-5eee8f7dfd5c\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"waste_ler_code_id\": \"33d3e986-2e02-4aaa-8be0-708c143c02d9\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"waste_rd_code_id\": \"6617caab-9db0-40df-8716-54d8c94e8056\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"provider_name\": \"Ecoveza S.L.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"total_km_to_waste_center\": 42`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\": \"ALB-2026-09-0002\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"facility_percentages\": [{ \"facility_id\": \"660e8400-e29b-41d4-a716-446655440000\", \"percentage\": 1 }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identification_name\": \"ALB-2026-09-0002\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\": \"2026-09-01\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\": \"2026-09-30\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"base_quantity\": 380,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"unit_id\": \"61743a63-ff70-459c-9567-5eee8f7dfd5c\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"description\": \"Mezcla de envases ligeros\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# Then poll the job from the Location header`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-api-key: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"x-organization-id: ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`62`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`62`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` time`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` uuid`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`BASE_URL`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.dcycle.io\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"x-api-key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"DCYCLE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"x-organization-id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"DCYCLE_ORG_ID\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`records `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"facility_percentages\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"facility_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"660e8400-e29b-41d4-a716-446655440000\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"percentage\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"identification_name\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"start_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"end_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-30\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"base_quantity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`1250.5`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"unit_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"waste_ler_code_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"33d3e986-2e02-4aaa-8be0-708c143c02d9\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# One key per batch: reuse it only to retry this same batch.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`idempotency_key `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` str`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(uuid.uuid4())`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` f`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{BASE_URL}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`/v2/wastes\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`**`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: idempotency_key},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` json`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"records\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: records},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` timeout`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`60`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.status_code `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`==`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` 422`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` and`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.json().get(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`==`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"BULK_RECORDS_REJECTED\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` for`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` rejection `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`in`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.json()[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(rejection[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"source_row_index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], rejection[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], rejection[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], rejection[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"error_params\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` raise`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` SystemExit`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Fix the listed records and resend the whole batch\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`response.raise_for_status()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job_url `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` BASE_URL`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` +`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.headers[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Location\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`while`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` True`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests.get(job_url, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`timeout`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`30`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`).json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`f`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'status'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'chunks_done'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`/`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'chunks_total'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` chunks\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`] `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`!=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"processing\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` break`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`10`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`] `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`==`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"completed_with_errors\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` page `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` 1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` while`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` True`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`# up to 5,000 records: read every page of failures`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` failed `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests.get(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` f`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job_url`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`/items\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`HEADERS`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` params`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"size\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`500`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"page\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: page},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` timeout`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`30`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ).json()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` for`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` item `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`in`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` failed[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"items\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"calculation failed:\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, item[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`], item[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"error_code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` page `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`*`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` failed[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"size\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`] `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`>=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` failed[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"total\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` break`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` page `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`+=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` 1`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`35`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`35`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` axios`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` require`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'axios'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` require`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'crypto'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` api`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` axios.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`create`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` baseURL: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'https://api.dcycle.io'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'x-api-key'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`DCYCLE_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'x-organization-id'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`DCYCLE_ORG_ID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`async`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` function`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` createWastes`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`records`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` let`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` try`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` api.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`post`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'/v2/wastes'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, { records }, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` headers: { `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'Idempotency-Key'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`() },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`catch`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` (error) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` body`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` error.response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` error.response.data;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` (body `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` body.code `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'BULK_RECORDS_REJECTED'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` body.errors.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`forEach`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`r`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(r.source_row_index, r.client_row_id, r.error_code, r.error_params));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` throw`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` error;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` jobPath`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.headers.location;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` let`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.data;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` while`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` (job.status `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'processing'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` Promise`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`resolve`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =>`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` setTimeout`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(resolve, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`10000`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` (`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` api.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`get`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(jobPath)).data;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"`${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`status`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"}: ${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`chunks_done`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"}/${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`job`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`chunks_total`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"} chunks`\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` return`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` job;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`split-one-waste-across-two-facilities`,children:`Split one waste across two facilities`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"records\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"client_row_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0100\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"identification_name\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"ALB-2026-09-0100\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"start_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"end_date\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-09-30\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"base_quantity\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`100`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"unit_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"waste_ler_code_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"33d3e986-2e02-4aaa-8be0-708c143c02d9\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"facility_percentages\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"facility_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"660e8400-e29b-41d4-a716-446655440000\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"percentage\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0.6`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"facility_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"770e8400-e29b-41d4-a716-446655440001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"percentage\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`0.4`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This creates two wastes (60 and 40 units) sharing one `,_jsx(_components.code,{children:`source_invoice_id`}),`, the id of the first one, as\n`,_jsx(_components.a,{href:`/api-reference/wastes/list`,children:`List Wastes`}),` and `,_jsx(_components.a,{href:`/api-reference/wastes/get`,children:`Get Waste`}),` return it. The job has `,_jsx(_components.strong,{children:`one`}),`\nitem for the record, whose `,_jsx(_components.code,{children:`entity_id`}),` is the first waste of the group.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Each share is a waste of its own: `,_jsx(_components.a,{href:`/api-reference/wastes/delete-v2`,children:`deleting`}),` that `,_jsx(_components.code,{children:`entity_id`}),` removes only the\nfirst share (`,_jsx(_components.a,{href:`/api-reference/wastes/delete-v2#body-parameters`,children:`Delete Wastes`}),` shows how to find every share). If\nyour integration may need to delete or replace the record later, send one record per facility with that\nfacility’s quantity (`,_jsx(_components.code,{children:`[{facility_id, percentage: 1}]`}),`), so every waste has its own item and id.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`retries-and-idempotency`,children:`Retries and idempotency`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Network error or timeout:`}),` retry within 24 hours with the `,_jsx(_components.strong,{children:`same`}),` `,_jsx(_components.code,{children:`Idempotency-Key`}),` and body. If the first\nrequest was accepted, you get the same job back and no wastes are duplicated.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`422 BULK_RECORDS_REJECTED`}),`:`]}),` nothing was stored. Fix the records and send the batch again (a new key is fine,\nsince the first request created nothing).`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`422 IDEMPOTENCY_KEY_REUSED`}),`:`]}),` the key already belongs to another batch. Use a new key, or resend the original\nbody unchanged.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`409 IDEMPOTENCY_KEY_IN_PROGRESS`}),`:`]}),` the first request with that key is still being processed. Wait `,_jsx(_components.code,{children:`Retry-After`}),`\nseconds and retry with the same key and body.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`429 TOO_MANY_REQUESTS`}),`:`]}),` nothing was written. Wait `,_jsx(_components.code,{children:`Retry-After`}),` seconds and resend with the same key and body.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Limit`}),_jsx(_components.th,{children:`Value`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Records per request`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1 to 5,000`})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Get Ingest Job`,icon:`magnifying-glass`,href:`/api-reference/ingest-jobs/get`,children:_jsx(_components.p,{children:`Status and progress of the batch`})}),_jsx(Card,{title:`List Ingest Job Items`,icon:`list`,href:`/api-reference/ingest-jobs/list-items`,children:_jsx(_components.p,{children:`Per-record outcomes, including calculation failures`})}),_jsx(Card,{title:`Webhooks`,icon:`bell`,href:`/api-reference/webhooks/overview`,children:_jsx(_components.p,{children:`Be told when the job finishes instead of polling`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Create Wastes (v2)","api":"POST /v2/wastes","description":"Create one or up to 5,000 wastes in one request; emissions are calculated asynchronously and tracked through an ingest job","tag":"BETA","href":"/api-reference/wastes/create-v2"}}}},"mdxExtracts":{"tableOfContents":[{"title":"What is a waste","slug":"what-is-a-waste","depth":2,"children":[{"title":"How the emissions are calculated","slug":"how-the-emissions-are-calculated","depth":3,"children":[]}]},{"title":"Find the ids you send","slug":"find-the-ids-you-send","depth":2,"children":[]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"One waste or many","slug":"one-waste-or-many","depth":2,"children":[]},{"title":"Request","slug":"request","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Query Parameters","slug":"query-parameters","depth":3,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"202 Accepted","slug":"202-accepted","depth":3,"children":[]},{"title":"Job status","slug":"job-status","depth":3,"children":[]},{"title":"Why a record failed to calculate","slug":"why-a-record-failed-to-calculate","depth":3,"children":[]}]},{"title":"Errors","slug":"errors","depth":2,"children":[{"title":"422 BULK_RECORDS_REJECTED — invalid records","slug":"422-bulk_records_rejected-—-invalid-records","depth":3,"children":[]},{"title":"422 IDEMPOTENCY_KEY_REUSED","slug":"422-idempotency_key_reused","depth":3,"children":[]},{"title":"409 IDEMPOTENCY_KEY_IN_PROGRESS","slug":"409-idempotency_key_in_progress","depth":3,"children":[]},{"title":"422 REQUEST_VALIDATION_FAILED — malformed request","slug":"422-request_validation_failed-—-malformed-request","depth":3,"children":[]},{"title":"401, 400 and 403: key and organization","slug":"401-400-and-403-key-and-organization","depth":3,"children":[]},{"title":"429 TOO_MANY_REQUESTS","slug":"429-too_many_requests","depth":3,"children":[]}]},{"title":"Examples","slug":"examples","depth":2,"children":[{"title":"Create a batch and wait for the calculation","slug":"create-a-batch-and-wait-for-the-calculation","depth":3,"children":[]},{"title":"Split one waste across two facilities","slug":"split-one-waste-across-two-facilities","depth":3,"children":[]}]},{"title":"Retries and idempotency","slug":"retries-and-idempotency","depth":2,"children":[]},{"title":"Limits","slug":"limits","depth":2,"children":[]},{"title":"Related Endpoints","slug":"related-endpoints","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"19\">\u003cspan class=\"line\">\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">curl\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -X\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> POST\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"https://api.dcycle.io/v2/wastes\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-api-key: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">DCYCLE_API_KEY\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-organization-id: ${\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">DCYCLE_ORG_ID\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Idempotency-Key: c41d8e77-5d40-4a11-9e8b-2c9f4d1e7a03\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -d\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"records\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"client_row_id\": \"ALB-2026-09-0001\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"facility_percentages\": [{ \"facility_id\": \"660e8400-e29b-41d4-a716-446655440000\", \"percentage\": 1 }],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"identification_name\": \"ALB-2026-09-0001\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"start_date\": \"2026-09-01\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"end_date\": \"2026-09-30\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"base_quantity\": 1250.5,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"unit_id\": \"61743a63-ff70-459c-9567-5eee8f7dfd5c\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"waste_ler_code_id\": \"33d3e986-2e02-4aaa-8be0-708c143c02d9\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"29\">\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">import\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> os\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">import\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> uuid\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">import\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">response \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"https://api.dcycle.io/v2/wastes\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#FFAB70\"> headers\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-api-key\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: os.environ[\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"DCYCLE_API_KEY\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"x-organization-id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: os.environ[\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"DCYCLE_ORG_ID\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Idempotency-Key\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">str\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(uuid.uuid4()), \u003c/span>\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"># keep it to retry this same batch\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#FFAB70\"> json\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"records\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"client_row_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"ALB-2026-09-0001\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"facility_percentages\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [{\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"facility_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"660e8400-e29b-41d4-a716-446655440000\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"percentage\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"identification_name\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"ALB-2026-09-0001\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"start_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-09-01\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"end_date\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-09-30\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"base_quantity\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1250.5\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"unit_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"waste_ler_code_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"33d3e986-2e02-4aaa-8be0-708c143c02d9\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#FFAB70\"> timeout\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">60\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">print\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(response.status_code, response.headers[\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Location\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">])\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"24\">\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">const\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> axios\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> =\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> require\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'axios'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">const\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">randomUUID\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> } \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> require\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'crypto'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">const\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> response\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> =\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> await\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> axios.\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">post\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://api.dcycle.io/v2/wastes'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> records: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> client_row_id: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'ALB-2026-09-0001'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> facility_percentages: [{ facility_id: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'660e8400-e29b-41d4-a716-446655440000'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, percentage: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> identification_name: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'ALB-2026-09-0001'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> start_date: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'2026-09-01'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> end_date: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'2026-09-30'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> base_quantity: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1250.5\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> unit_id: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'61743a63-ff70-459c-9567-5eee8f7dfd5c'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> waste_ler_code_id: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'33d3e986-2e02-4aaa-8be0-708c143c02d9'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> headers: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> 'x-api-key'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: process.env.\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">DCYCLE_API_KEY\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> 'x-organization-id'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: process.env.\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">DCYCLE_ORG_ID\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> 'Idempotency-Key'\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">randomUUID\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(), \u003c/span>\u003cspan style=\"color:#6A737D;--shiki-dark:#6A737D\">// keep it to retry this same batch\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">console.\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">log\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(response.status, response.headers.location);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"202","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"status\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"processing\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"entity_type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"wastes\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"operation\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"create\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"source\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"api_bulk\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"counts\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: { \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"submitted\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"succeeded\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"failed\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"chunks_total\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"chunks_done\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-09-29T10:15:02.184Z\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"finished_at\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">null\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"links\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"self\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"items\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa/items\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"422","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"https://code.dcycle.io/api-reference/errors#BULK_RECORDS_REJECTED\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"title\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Unprocessable Entity\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"status\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">422\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"code\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"BULK_RECORDS_REJECTED\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"detail\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"1 of the submitted records are invalid; nothing was written.\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"errors\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"source_row_index\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"client_row_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"ALB-2026-09-0001\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"error_code\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"REFERENCE_NOT_FOUND\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"error_params\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: { \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"field\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"waste_ler_code_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">\"value\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"0f0e0d0c-0000-4000-8000-000000000000\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"rejected\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"request_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"b2248a31-0f1b-4a7d-83ce-b29bd5977b4c\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"200 (dry_run=true)","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"dry_run\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">true\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"submitted\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"valid\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">1\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create Wastes (v2)","path":"/v2/wastes","servers":[{"url":"https://api.dcycle.io"}],"method":"post","request":{"security":[],"parameters":{"query":{"dry_run":{"schema":[{"type":"boolean","description":"Validate only. The record checks run without writing: an invalid batch answers the same `422` , nothing is written and no job is created; a valid batch answers `200` with `{\"dry_run\": true, \"submitted\": n, \"valid\": n}` . Use it to test an integration without creating data. The `Idempotency-Key` header is still required, but a dry run does not check or store it, so you can send the real request with the same key afterwards. See Dry run ."}]}},"header":{"x-api-key":{"schema":[{"type":"string","description":"Your API key (see Authentication ). Example: `${DCYCLE_API_KEY}`","required":true}]},"x-organization-id":{"schema":[{"type":"string","description":"UUID of the organization the wastes are created for: in Dcycle, Company settings → Organization info , click Copy organization ID ( Get an API Key ). Every facility of its perimeter (the organization and its accepted, enabled subsidiaries) is a valid destination. Example: `a8315ef3-dd50-43f8-b7ce-d839e68d51fa`","required":true}]},"Content-Type":{"schema":[{"type":"string","description":"Must be `application/json`","required":true}]},"Idempotency-Key":{"schema":[{"type":"string","description":"1 to 255 characters. Send one key per batch (a UUID works well); it is looked up per organization across every v2 bulk route (wastes, facilities, invoices…). Within 24 hours, the same key with the same route and body returns that same job (with `Idempotent-Replayed: true` ) instead of creating the wastes again, so a timeout or network error can be retried safely. The same key with a different body or on another route is rejected with `422 IDEMPOTENCY_KEY_REUSED` : use a new key for a new batch. A retry that arrives while the first request is still being processed gets `409 IDEMPOTENCY_KEY_IN_PROGRESS` . After 24 hours the key is free and a request with it is a new one, so retry within that window. See The Idempotency-Key . Example: `c41d8e77-5d40-4a11-9e8b-2c9f4d1e7a03`","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"records":[{"type":"object","properties":{"facility_percentages":[{"type":"object","properties":{"facility_id":[{"type":"string","description":"UUID of the facility receiving this share.","required":true}],"percentage":[{"type":"number","description":"Fraction of the quantity, greater than 0 and at most 1. Example: `0.6`","required":true}]},"description":"The facilities the waste belongs to and each one’s share, as in invoices v2 . One waste is created per entry, with `quantity = base_quantity × percentage` ; each waste’s `quantity` is stored with 3 decimals (2 t at 0.3333 gives 0.667 t). A whole waste of one facility is `[{facility_id, percentage: 1}]` . Each facility once, all inside your perimeter , and the percentages add up to 1 at most; under 1, the rest of the waste is not counted. Facility ids come from `GET /v1/facilities` . Example: `[{\"facility_id\": \"660e8400-e29b-41d4-a716-446655440000\", \"percentage\": 1}]`","required":true}],"identification_name":[{"type":"string","description":"Waste identification name or invoice/delivery-note number. Example: `\"ALB-2026-09-0001\"`","required":true}],"start_date":[{"type":"string","description":"Start of the waste period (ISO 8601), from 1970 to tomorrow in UTC at the latest . Send the period of each collection by the waste manager as your data has it; a collection with a single date sends it as both `start_date` and `end_date` . A period that spans several years is split between them in proportion to its days. Example: `\"2026-09-01\"`","required":true}],"end_date":[{"type":"string","description":"End of the waste period (ISO 8601), on or after `start_date` , tomorrow in UTC at the latest . Example: `\"2026-09-30\"`","required":true}],"base_quantity":[{"type":"number","description":"Quantity of waste in `unit_id` . Must be greater than 0. It is stored with 3 decimals. In tonnes, send at most 3 (0.001 t is 1 kg): a finer quantity, such as 1.2505 t, rejects the record with `TOO_MANY_DECIMALS` ; send it in kilograms instead (1,250.5 kg). Floating-point noise, such as 0.21000000000000002 t, is taken as 0.21 t. In any other unit, a finer quantity is rounded to 3 decimals (to the gram in kilograms). Example: `1250.5`","required":true}],"unit_id":[{"type":"string","description":"Kilograms `61743a63-ff70-459c-9567-5eee8f7dfd5c` or tonnes `cab66828-c2b1-431b-92af-f9ab37149d3c` , the units `GET /v2/units?type=wastes` lists. A quantity in a unit other than that of the emission factor applied (per tonne in DEFRA, the default database) is converted to it, and the calculation detail in the app shows that step. Any unit other than kilograms or tonnes is supported only with your own emission factor: a waste priced with a `custom_ef_record_id` may use the unit of that record, the one its factor is per; when that unit is not a weight (m3), only it, since kilograms and tonnes cannot be converted to it. The Dcycle app offers custom factors for wastes per kilogram or per cubic metre ( `GET /v2/units?type=custom_emission_factors_wastes` ): send a volume in m3 (litres ÷1,000) with a per-m3 factor. A custom factor in another unit works the same way: a weight unit lets the waste use kilograms, tonnes or that unit, and any other unit only itself. A record without a unit is rejected with `SCHEMA_INVALID` , and one with any other unit with `UNIT_NOT_SUPPORTED` . Example: `\"61743a63-ff70-459c-9567-5eee8f7dfd5c\"`","required":true}],"waste_ler_code_id":[{"type":"string","description":"UUID of the LER (European List of Waste) code, taken from `GET /v1/wastes/ler-codes` . Required unless you send a `custom_ef_record_id` , or a non-empty `description` (then the description is matched to a waste type automatically before the calculation). Example: `\"33d3e986-2e02-4aaa-8be0-708c143c02d9\"` ( `150106` , mixed packaging)"}],"waste_rd_code_id":[{"type":"string","description":"UUID of the R/D (recovery/disposal) treatment code, taken from `GET /v1/wastes/rd-codes?ler_code_id=…` , which lists the treatments with an emission factor for that LER code. Optional, but send it when you know the treatment: without it Dcycle prices the waste with a conservative default factor (see How the emissions are calculated ). Example: `\"6617caab-9db0-40df-8716-54d8c94e8056\"` ( `R03` )"}],"description":[{"type":"string","description":"Description of the waste. Required (non-empty) when `waste_ler_code_id` is omitted. Example: `\"Mezcla de envases ligeros\"`"}],"destination":[{"type":"string","description":"Waste destination or treatment facility. Example: `\"Centro de tratamiento Ecoveza\"`"}],"provider_name":[{"type":"object","properties":{},"description":"Business name of the waste manager that treats the waste. Example: `\"Ecoveza S.L.\"`"}],"transporter_name":[{"type":"object","properties":{},"description":"Business name of the carrier that takes the waste to the treatment plant, when it is not the waste manager. Example: `\"Transportes Levante S.L.\"`"}],"total_km_to_waste_center":[{"type":"number","description":"Distance to the waste center in km, used to calculate collection transport emissions. Optional: with `0` , the default, the waste has no transport emissions. How the distance is priced is in How the emissions are calculated . From 0 to 500,000. Example: `42`"}],"custom_ef_record_id":[{"type":"object","properties":{},"description":"UUID of one of your custom emission factor records , to calculate this waste with your own factor instead of the standard databases. The record must be visible to the organization of the first facility in `facility_percentages` (the one that owns the waste), enabled, and configured for the `wastes` activity category. With it, `waste_ler_code_id` is optional. In a split ( `facility_percentages` ), every resulting waste uses the same factor. Example: `\"c3d4e5f6-a7b8-9012-cdef-ab3456789012\"`"}],"file_url":[{"type":"object","properties":{},"description":"URL of a supporting document (e.g. a waste manifest), or the document itself as a base64 data URI ( `data:\u003cmime>;base64,...` ), which is uploaded and stored as a URL. A data URI that is not valid base64 rejects the record with `SCHEMA_INVALID` ."}],"file_name":[{"type":"object","properties":{},"description":"Original name of the attached document (e.g. `manifest.xlsx` ), up to 255 characters."}],"file_id":[{"type":"object","properties":{},"description":"UUID of a file of your files to attach as the supporting document, instead of sending it inline in `file_url` : upload it first ( `POST /v1/files/presigned-urls` with `skip_processing: true` so it is stored without being read, the upload, then `PATCH /v1/files/batch-update` to `uploaded` ). The waste stores the file’s URL and its name with extension as `file_url` and `file_name` (both sent are ignored). The file must be `uploaded` and belong to your organization or one you can write to; any other id rejects the record with `REFERENCE_NOT_FOUND` ( `field: \"file_id\"` ). Sent together with a data URI in `file_url` , the record is rejected with `SCHEMA_INVALID` . In a split, every resulting waste links the same file. Example: `\"7c9e6679-7425-40de-944b-e07fc1f90ae7\"`"}],"attachment_file_id":[{"type":"object","properties":{},"description":"UUID of a file of your files to attach to the waste as its supporting document (e.g. the waste manifest), uploaded as for `file_id` . Unlike `file_id` , the waste keeps it apart from the file it was read from, and reads it back in `attachment` of Get Waste . The file must be `uploaded` and belong to your organization or one you can write to, and a private file only to the organization of every facility; any other id rejects the record with `REFERENCE_NOT_FOUND` ( `field: \"attachment_file_id\"` ). In a split, every resulting waste takes it. Example: `\"7c9e6679-7425-40de-944b-e07fc1f90ae7\"`"}],"client_row_id":[{"type":"object","properties":{},"description":"Your own identifier for the record, up to 255 characters. It is echoed on every outcome for this record (in rejections and in the job’s items), so you can correlate results without tracking array positions. Example: `\"ALB-2026-09-0001\"`"}]},"description":"The wastes to create: between 1 and 5,000 objects. Each record has the fields below; a field it does not declare (a typo, or `facility_id` ) rejects the record with `SCHEMA_INVALID` .","required":true}]}}],"examples":{"example":{"value":{"records":{"facility_percentages":{"facility_id":"\u003cstring>","percentage":123},"identification_name":"\u003cstring>","start_date":"\u003cstring>","end_date":"\u003cstring>","base_quantity":123,"unit_id":"\u003cstring>","waste_ler_code_id":"\u003cstring>","waste_rd_code_id":"\u003cstring>","description":"\u003cstring>","destination":"\u003cstring>","provider_name":{},"transporter_name":{},"total_km_to_waste_center":123,"custom_ef_record_id":{},"file_url":{},"file_name":{},"file_id":{},"attachment_file_id":{},"client_row_id":{}}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"Ingest job id. Use it with `GET /v2/ingest-jobs/{job_id}` ."}],"status":[{"type":"string","description":"`processing` right after the request. See Job status ."}],"entity_type":[{"type":"string","description":"Always `wastes` for this endpoint."}],"operation":[{"type":"string","description":"Always `create` ."}],"source":[{"type":"string","description":"`api_bulk` when sent with an API key; `app` when sent by a person signed in to Dcycle (e.g. the app’s waste form)."}],"counts":[{"type":"object","properties":{"submitted":[{"type":"integer","description":"Records in the request. All of them were stored."}],"succeeded":[{"type":"integer","description":"Records whose emissions have been calculated."}],"failed":[{"type":"integer","description":"Records whose calculation failed. The waste exists but has no emissions; the job’s items say which ones."}]}}],"chunks_total":[{"type":"integer","description":"Number of calculation chunks (100 records each)."}],"chunks_done":[{"type":"integer","description":"Chunks already calculated. `chunks_done / chunks_total` is the job’s progress."}],"created_at":[{"type":"object","properties":{},"description":"When the job was created (UTC)."}],"finished_at":[{"type":"object","properties":{},"description":"When the last chunk finished (UTC), `null` while the job is processing."}],"links":[{"type":"object","properties":{},"description":"`self` : the job. `items` : its per-record outcomes."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","status":"\u003cstring>","entity_type":"\u003cstring>","operation":"\u003cstring>","source":"\u003cstring>","counts":{"submitted":123,"succeeded":123,"failed":123},"chunks_total":123,"chunks_done":123,"created_at":{},"finished_at":{},"links":{}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"dcyleio","siteName":"Dcycle Platform Docs","title":"Create Wastes (v2) - Dcycle Platform Docs","navMaps":{"firstHrefInVersion":{"New API (Recommended)":{"href":"/api-reference/wastes/create-v2","matchLevel":0},"Legacy API":{"href":"/api-reference/legacy/wastes/codes","matchLevel":2}},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T10:09:11.538Z","originalFileLocation":"api-reference/wastes/create-v2.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create one or up to 5,000 wastes in one request; emissions are calculated asynchronously and tracked through an ingest job\">\u003cmeta data-mint-head name=\"application-name\" content=\"Dcycle Platform Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Wastes (v2) - Dcycle Platform Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create one or up to 5,000 wastes in one request; emissions are calculated asynchronously and tracked through an ingest job\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dcycle Platform Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://code.dcycle.io/api-reference/wastes/create-v2\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dcyleio.mintlify.site/_mintlify/api/og/v2?division=Wastes\u0026amp;title=Create+Wastes+%28v2%29\u0026amp;description=Create+one+or+up+to+5%2C000+wastes+in+one+request%3B+emissions+are+calculated+asynchronously+and+tracked+through+an+ingest+job\u0026amp;theme=017e158e6e1570670d1c2f42\u0026amp;signature=f0a4b3926e1ff724d37bdea64ee6bb2193bfe62dfe49ce7367725b2c6033566d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Wastes (v2) - Dcycle Platform Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create one or up to 5,000 wastes in one request; emissions are calculated asynchronously and tracked through an ingest job\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dcyleio.mintlify.site/_mintlify/api/og/v2?division=Wastes\u0026amp;title=Create+Wastes+%28v2%29\u0026amp;description=Create+one+or+up+to+5%2C000+wastes+in+one+request%3B+emissions+are+calculated+asynchronously+and+tracked+through+an+ingest+job\u0026amp;theme=017e158e6e1570670d1c2f42\u0026amp;signature=f0a4b3926e1ff724d37bdea64ee6bb2193bfe62dfe49ce7367725b2c6033566d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dcyleio/q7dxVY1vTbgXGd35/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dcycle Platform Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006ad4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://code.dcycle.io/api-reference/wastes/create-v2\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/wastes/create-v2.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://code.dcycle.io/#organization\",\"name\":\"Dcycle Platform Docs\",\"url\":\"https://code.dcycle.io\"},{\"@type\":\"WebSite\",\"@id\":\"https://code.dcycle.io#website\",\"name\":\"Dcycle Platform Docs\",\"url\":\"https://code.dcycle.io\",\"publisher\":{\"@id\":\"https://code.dcycle.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://code.dcycle.io/api-reference/wastes/create-v2#webpage\",\"url\":\"https://code.dcycle.io/api-reference/wastes/create-v2\",\"name\":\"Create Wastes (v2)\",\"description\":\"Create one or up to 5,000 wastes in one request; emissions are calculated asynchronously and tracked through an ingest job\",\"dateModified\":\"2026-11-13T10:09:11.538Z\",\"isPartOf\":{\"@id\":\"https://code.dcycle.io#website\"},\"breadcrumb\":{\"@id\":\"https://code.dcycle.io/api-reference/wastes/create-v2#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://code.dcycle.io/api-reference/wastes/create-v2#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Wastes\",\"item\":\"https://code.dcycle.io/api-reference/wastes/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Wastes (v2)\",\"item\":\"https://code.dcycle.io/api-reference/wastes/create-v2\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://code.dcycle.io/api-reference/wastes/create-v2#apireference\",\"headline\":\"Create Wastes (v2)\",\"name\":\"Create Wastes (v2)\",\"description\":\"Create one or up to 5,000 wastes in one request; emissions are calculated asynchronously and tracked through an ingest job\",\"url\":\"https://code.dcycle.io/api-reference/wastes/create-v2\",\"mainEntityOfPage\":{\"@id\":\"https://code.dcycle.io/api-reference/wastes/create-v2#webpage\"},\"dateModified\":\"2026-11-13T10:09:11.538Z\",\"publisher\":{\"@id\":\"https://code.dcycle.io/#organization\"},\"isPartOf\":{\"@id\":\"https://code.dcycle.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dcycle Platform Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Dcycle Platform Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/wastes/create-v2.md","siteName":"Dcycle Platform Docs","nav":{"global":null,"tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":"/docs/introduction"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/emissions/overview"}]},{"tab":"API","versions":[{"version":"New API (Recommended)","groups":[{"group":"Introduction","pages":[{"title":"API Introduction","href":"/api-reference/introduction"},{"title":"Changelog","href":"/api-reference/changelog"},{"title":"Errors","href":"/api-reference/errors"},{"title":"OpenAPI \u0026 SDKs","href":"/api-reference/openapi-sdks"},{"title":"Rate Limits","href":"/api-reference/rate-limits"}]},{"group":"Business Travels","pages":[{"title":"Business Travels API","href":"/api-reference/business-travels/overview"},{"title":"Get Business Travel Totals","api":"GET /v1/business-travels/totals","href":"/api-reference/business-travels/totals"},{"title":"Get Business Travel Version History","api":"GET /v1/business-travels/{business_travel_id}/versions","href":"/api-reference/business-travels/versions"},{"title":"List Business Travels","api":"GET /v1/business-travels","href":"/api-reference/business-travels/list"},{"title":"Get Business Travel","api":"GET /v1/business-travels/{business_travel_id}","href":"/api-reference/business-travels/get"},{"title":"Create Business Travel","api":"POST /v1/business-travels","deprecated":true,"href":"/api-reference/business-travels/create"},{"title":"Create Business Travels (v2)","api":"POST /v2/business-travels","tag":"BETA","href":"/api-reference/business-travels/create-v2"},{"title":"Delete Business Travels (v2)","api":"POST /v2/business-travels/delete","tag":"BETA","href":"/api-reference/business-travels/delete-v2"},{"title":"Update Business Travel","api":"PATCH /v1/business-travels/{business_travel_id}","href":"/api-reference/business-travels/update"},{"title":"Delete Business Travel","api":"DELETE /v1/business-travels/{business_travel_id}","deprecated":true,"href":"/api-reference/business-travels/delete"},{"title":"Bulk Delete Business Travels","api":"POST /v1/business-travels/bulk-delete","deprecated":true,"href":"/api-reference/business-travels/bulk-delete"},{"title":"Bulk Delete Business Travels by Filters","api":"POST /v1/business-travels/bulk-delete-by-filters","href":"/api-reference/business-travels/bulk-delete-by-filters"}]},{"group":"Custom Emission Factors","pages":[{"title":"Custom Emission Factor Databases","tag":"BETA","href":"/api-reference/custom-emission-factors/overview"},{"title":"List Custom Database Versions","api":"GET /v1/emission-factors/custom-databases/{database_id}/versions","tag":"BETA","href":"/api-reference/custom-emission-factors/list-versions"},{"title":"List Custom Databases","api":"GET /v1/emission-factors/custom-databases","tag":"BETA","href":"/api-reference/custom-emission-factors/list-databases"},{"title":"List Custom Records","api":"GET /v1/emission-factors/custom-databases/{database_id}/versions/{source_id}/records","tag":"BETA","href":"/api-reference/custom-emission-factors/list-records"},{"title":"Get Custom Record","api":"GET /v1/emission-factors/custom-databases/record/{record_id}","tag":"BETA","href":"/api-reference/custom-emission-factors/get-record"},{"title":"Create Custom Database","api":"POST /v1/emission-factors/custom-databases","tag":"BETA","href":"/api-reference/custom-emission-factors/create-database"},{"title":"Create Custom Database Version","api":"POST /v1/emission-factors/custom-databases/{database_id}/versions","tag":"BETA","href":"/api-reference/custom-emission-factors/create-version"},{"title":"Create Custom Record","api":"POST /v1/emission-factors/custom-databases/{database_id}/versions/{source_id}/records","tag":"BETA","href":"/api-reference/custom-emission-factors/create-record"},{"title":"Update Custom Record","api":"PATCH /v1/emission-factors/custom-databases/{database_id}/versions/{source_id}/records/{record_id}","tag":"BETA","href":"/api-reference/custom-emission-factors/update-record"},{"title":"Delete Custom Record","api":"DELETE /v1/emission-factors/custom-databases/{database_id}/versions/{source_id}/records/{record_id}","tag":"BETA","href":"/api-reference/custom-emission-factors/delete-record"}]},{"group":"Custom Emission Groups","pages":[{"title":"List Custom Emission Groups","api":"GET /custom_emission_groups/light","href":"/api-reference/custom-emission-groups/list-light"}]},{"group":"Custom KPI","pages":[{"title":"Custom KPI","href":"/api-reference/custom-kpi/overview"},{"title":"List Dataset Values","api":"GET /v1/custom-kpi-datasets/{dataset_id}/values","href":"/api-reference/custom-kpi/list-dataset-values"},{"title":"List Datasets","api":"GET /v1/custom-kpi-datasets","href":"/api-reference/custom-kpi/list-datasets"},{"title":"Get Dataset","api":"GET /v1/custom-kpi-datasets/{dataset_id}","href":"/api-reference/custom-kpi/get-dataset"},{"title":"Create Dataset","api":"POST /v1/custom-kpi-datasets","href":"/api-reference/custom-kpi/create-dataset"},{"title":"Download Excel","api":"POST /v1/custom-kpi-datasets/{dataset_id}/download_excel","href":"/api-reference/custom-kpi/download-excel"},{"title":"Submit Response","api":"POST /v1/custom-kpi-datasets/{dataset_id}/responses","href":"/api-reference/custom-kpi/submit-response"},{"title":"Update Dataset","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}","href":"/api-reference/custom-kpi/update-dataset"},{"title":"Delete Dataset","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}","href":"/api-reference/custom-kpi/delete-dataset"},{"title":"Presigned URL","api":"POST /v1/custom-kpi-datasets/{dataset_id}/responses/attachments/presigned-url","href":"/api-reference/custom-kpi/presigned-url"},{"group":"Assignments","expanded":true,"pages":[{"title":"List Assignments","api":"GET /v1/custom-kpi-datasets/{dataset_id}/assignments","href":"/api-reference/custom-kpi/list-assignments"},{"title":"Create Assignment","api":"POST /v1/custom-kpi-datasets/{dataset_id}/assignments","href":"/api-reference/custom-kpi/create-assignment"},{"title":"Update Assignment","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}/assignments/{assignment_id}","href":"/api-reference/custom-kpi/update-assignment"},{"title":"Delete Assignment","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}/assignments/{assignment_id}","href":"/api-reference/custom-kpi/delete-assignment"}]},{"group":"Campaigns","expanded":true,"pages":[{"title":"Assignment Versions","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}/versions","href":"/api-reference/custom-kpi/assignment-versions"},{"title":"Get Assignment Values","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}/values","href":"/api-reference/custom-kpi/get-assignment-values"},{"title":"List Campaign Values","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/values","href":"/api-reference/custom-kpi/list-campaign-values"},{"title":"List Campaigns","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns","href":"/api-reference/custom-kpi/list-campaigns"},{"title":"List Response Sets","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/response-sets","href":"/api-reference/custom-kpi/list-response-sets"},{"title":"Get Campaign","api":"GET /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}","href":"/api-reference/custom-kpi/get-campaign"},{"title":"Add Campaign Recipient","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments","href":"/api-reference/custom-kpi/add-campaign-recipient"},{"title":"Create Campaign","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns","href":"/api-reference/custom-kpi/create-campaign"},{"title":"Lock Campaign","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/lock","href":"/api-reference/custom-kpi/lock-campaign"},{"title":"Resend Invite","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}/resend","href":"/api-reference/custom-kpi/resend-invite"},{"title":"Send Invites","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/send-invites","href":"/api-reference/custom-kpi/send-invites"},{"title":"Unlock Campaign","api":"POST /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/unlock","href":"/api-reference/custom-kpi/unlock-campaign"},{"title":"Edit Assignment Values","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}/values","href":"/api-reference/custom-kpi/edit-assignment-values"},{"title":"Update Campaign","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}","href":"/api-reference/custom-kpi/update-campaign"},{"title":"Delete Campaign","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}","href":"/api-reference/custom-kpi/delete-campaign"},{"title":"Remove Campaign Recipient","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}/campaigns/{campaign_id}/assignments/{campaign_assignment_id}","href":"/api-reference/custom-kpi/remove-campaign-recipient"}]},{"group":"KPIs","expanded":true,"pages":[{"title":"Create KPI","api":"POST /v1/custom-kpi-datasets/{dataset_id}/kpis","href":"/api-reference/custom-kpi/create-kpi"},{"title":"Update KPI","api":"PATCH /v1/custom-kpi-datasets/{dataset_id}/kpis/{kpi_id}","href":"/api-reference/custom-kpi/update-kpi"},{"title":"Delete KPI","api":"DELETE /v1/custom-kpi-datasets/{dataset_id}/kpis/{kpi_id}","href":"/api-reference/custom-kpi/delete-kpi"}]}]},{"group":"Dashboards","pages":[{"title":"Dashboards API","href":"/api-reference/dashboards/overview"},{"title":"List Dashboards","api":"GET /v2/dashboard","href":"/api-reference/dashboards/list"},{"title":"Get Dashboard","api":"GET /v2/dashboard/{dashboard_id}","href":"/api-reference/dashboards/get"},{"title":"Create Dashboard","api":"POST /v2/dashboard","href":"/api-reference/dashboards/create"},{"title":"Update Dashboard","api":"PATCH /v2/dashboard/{dashboard_id}","href":"/api-reference/dashboards/update"},{"title":"Delete Dashboard","api":"DELETE /v2/dashboard/{dashboard_id}","href":"/api-reference/dashboards/delete"}]},{"group":"Datasets","pages":[{"title":"Get Dataset Schema","api":"GET /v1/datasets/{key}/schema","href":"/api-reference/datasets/schema"},{"title":"List Available Datasets","api":"GET /v1/datasets","href":"/api-reference/datasets/list"},{"title":"Query datasets","api":"POST /v1/datasets/{key}/query","href":"/api-reference/datasets/query"}]},{"group":"Emissions","pages":[{"title":"Emissions","href":"/api-reference/emissions/overview"},{"title":"Get Emissions Summary","api":"GET /v1/total-impacts","href":"/api-reference/emissions/get-summary"}]},{"group":"Employees","pages":[{"title":"Employees API","href":"/api-reference/employees/overview"},{"title":"List Employees","api":"GET /v1/employees","href":"/api-reference/employees/list"},{"title":"List Employees (V2)","api":"GET /v2/employees","href":"/api-reference/employees/list-v2"},{"title":"List Survey Rows","api":"GET /v2/employees/survey-rows","href":"/api-reference/employees/survey-rows"},{"title":"Queue Pending Mobility Survey Export","api":"GET /v2/employees/pending-survey/download","href":"/api-reference/employees/pending-survey-download"},{"title":"Get Commuting Response (v2)","api":"GET /v2/employees/commuting/responses/{response_id}","tag":"BETA","href":"/api-reference/employees/commuting-response-get-v2"},{"title":"Get Employee","api":"GET /v1/employees/{employee_id}","href":"/api-reference/employees/get"},{"title":"Create Commuting Periods (v2)","api":"POST /v2/employees/commuting","tag":"BETA","href":"/api-reference/employees/commuting-create-v2"},{"title":"Create Employee","api":"POST /v1/employees","deprecated":true,"href":"/api-reference/employees/create"},{"title":"Create Employees (v2)","api":"POST /v2/employees","tag":"BETA","href":"/api-reference/employees/create-v2"},{"title":"Delete Commuting Periods (v2)","api":"POST /v2/employees/commuting/delete","tag":"BETA","href":"/api-reference/employees/commuting-delete-v2"},{"title":"Delete Employees (v2)","api":"POST /v2/employees/delete","tag":"BETA","href":"/api-reference/employees/delete-v2"},{"title":"Download Survey Rows","api":"POST /v2/employees/survey-rows/export","href":"/api-reference/employees/survey-rows-export"},{"title":"Resend Commuting Survey","api":"POST /v1/employees/resend-survey","href":"/api-reference/employees/resend-survey"},{"title":"Replace Commuting Response (v2)","api":"PUT /v2/employees/commuting/responses/{response_id}","tag":"BETA","href":"/api-reference/employees/commuting-response-replace-v2"},{"title":"Update Employee","api":"PATCH /v1/employees/{employee_id}","href":"/api-reference/employees/update"},{"title":"Delete Employee","api":"DELETE /v1/employees/{employee_id}","deprecated":true,"href":"/api-reference/employees/delete"},{"title":"Bulk Delete Employees","api":"POST /v2/employees/bulk-delete","deprecated":true,"href":"/api-reference/employees/bulk-delete"},{"title":"Bulk Delete Employees by Filters","api":"POST /v2/employees/bulk-delete-by-filters","href":"/api-reference/employees/bulk-delete-by-filters"},{"title":"CSV Import","api":"POST /v1/employees/csv","href":"/api-reference/employees/csv-import"},{"title":"Recalculate Employees","api":"POST /v2/employees/recalculate","href":"/api-reference/employees/recalculate"},{"group":"Commuting Periods","expanded":true,"pages":[{"title":"Calculation Steps","api":"GET /v1/employee-historic/{employee_historic_id}/steps","href":"/api-reference/employees/commuting-periods/calculation-steps"},{"title":"List Commuting Periods","api":"GET /v1/employee-historic","href":"/api-reference/employees/commuting-periods/list"},{"title":"Get Commuting Period","api":"GET /v1/employee-historic/{employee_historic_id}","href":"/api-reference/employees/commuting-periods/get"},{"title":"Create Commuting Period","api":"POST /v1/employee-historic","deprecated":true,"href":"/api-reference/employees/commuting-periods/create"},{"title":"Update Commuting Period","api":"PATCH /v1/employee-historic/{employee_historic_id}","href":"/api-reference/employees/commuting-periods/update"},{"title":"Delete Commuting Period","api":"DELETE /v1/employee-historic/{employee_historic_id}","deprecated":true,"href":"/api-reference/employees/commuting-periods/delete"},{"title":"CSV Upload","api":"POST /v1/employee-historic/bulk/csv","deprecated":true,"href":"/api-reference/employees/commuting-periods/csv-upload"}]},{"group":"Survey Templates","expanded":true,"pages":[{"title":"Survey Templates API","href":"/api-reference/employees/survey-templates/overview"},{"title":"List Survey Templates","api":"GET /v1/employee-survey-templates","href":"/api-reference/employees/survey-templates/list"},{"title":"Get Survey Template","api":"GET /v1/employee-survey-templates/{template_id}","href":"/api-reference/employees/survey-templates/get"},{"title":"Create Survey Template","api":"POST /v1/employee-survey-templates","href":"/api-reference/employees/survey-templates/create"},{"title":"Block Template","api":"PATCH /v1/employee-survey-templates/{template_id}/block","href":"/api-reference/employees/survey-templates/block"},{"title":"Set Default Template","api":"PATCH /v1/employee-survey-templates/{template_id}/default","href":"/api-reference/employees/survey-templates/set-default"},{"title":"Unblock Template","api":"PATCH /v1/employee-survey-templates/{template_id}/unblock","href":"/api-reference/employees/survey-templates/unblock"},{"title":"Update Survey Template","api":"PATCH /v1/employee-survey-templates/{template_id}","href":"/api-reference/employees/survey-templates/update"},{"title":"Delete Survey Template","api":"DELETE /v1/employee-survey-templates/{template_id}","href":"/api-reference/employees/survey-templates/delete"},{"title":"Clone Survey Template","api":"POST /v1/employee-survey-templates/{template_id}/clone","href":"/api-reference/employees/survey-templates/clone"}]}]},{"group":"Facilities","pages":[{"title":"Facilities API","href":"/api-reference/facilities/overview"},{"title":"Get Facility Version History","api":"GET /v1/facilities/{facility_id}/versions","href":"/api-reference/facilities/versions"},{"title":"List Facilities","api":"GET /v1/facilities","href":"/api-reference/facilities/list"},{"title":"Get Facility","api":"GET /v1/facilities/{facility_id}","href":"/api-reference/facilities/get"},{"title":"Create Facilities (v2)","api":"POST /v2/facilities","tag":"BETA","href":"/api-reference/facilities/create-v2"},{"title":"Create Facility","api":"POST /v1/facilities","deprecated":true,"href":"/api-reference/facilities/create"},{"title":"Create Waste Water Facility","api":"POST /v1/facilities/waste_water","deprecated":true,"href":"/api-reference/facilities/create-waste-water"},{"title":"Delete Facilities (v2)","api":"POST /v2/facilities/delete","tag":"BETA","href":"/api-reference/facilities/delete-v2"},{"title":"Update Facility","api":"PUT /v1/facilities/{facility_id}","href":"/api-reference/facilities/update"},{"title":"Delete Facility","api":"DELETE /v1/facilities/{facility_id}","deprecated":true,"href":"/api-reference/facilities/delete"}]},{"group":"Files","pages":[{"title":"Files","href":"/api-reference/files/overview"},{"title":"Get a File's Sheets","api":"GET /v2/files/{file_id}/sheets","tag":"BETA","href":"/api-reference/files/sheets-v2"},{"title":"List File Readings","api":"GET /v1/files/readings","href":"/api-reference/files/readings"},{"title":"Get a File (v2)","api":"GET /v2/files/{file_id}","tag":"BETA","href":"/api-reference/files/get-v2"},{"title":"Create Records From File Reading","api":"POST /v1/files/readings","href":"/api-reference/files/create-records"},{"title":"Retry File Processing","api":"POST /v1/files/send-event","href":"/api-reference/files/process"},{"title":"Update File Reading","api":"PUT /v1/files/readings/{file_reading_id}","href":"/api-reference/files/update-reading"},{"title":"Open an Import Session","api":"POST /v2/files/{file_id}/import-sessions","tag":"BETA","href":"/api-reference/files/import-sessions-v2"},{"title":"Upload a File (v2)","api":"POST /v2/files","tag":"BETA","href":"/api-reference/files/upload-v2"},{"title":"Upload Files","api":"POST /v1/files/presigned-urls","href":"/api-reference/files/upload"}]},{"group":"Historical Emissions","pages":[{"title":"Historical Emissions","href":"/api-reference/historical-emissions/overview"},{"title":"Get Historical Emission Version History","api":"GET /v1/historical-emissions/{historical_emission_id}/versions","href":"/api-reference/historical-emissions/versions"},{"title":"List Historical Emissions","api":"GET /v1/historical-emissions/","href":"/api-reference/historical-emissions/list"},{"title":"Get Historical Emission","api":"GET /v1/historical-emissions/{historical_emission_id}","href":"/api-reference/historical-emissions/get"},{"title":"Create Historical Emission","api":"POST /v1/historical-emissions/","href":"/api-reference/historical-emissions/create"},{"title":"Update Historical Emission","api":"PATCH /v1/historical-emissions/{historical_emission_id}","href":"/api-reference/historical-emissions/update"},{"title":"Delete Historical Emission","api":"DELETE /v1/historical-emissions/{historical_emission_id}","href":"/api-reference/historical-emissions/delete"}]},{"group":"Hotel Stays","pages":[{"title":"Hotel Stays API","href":"/api-reference/hotel-stays/overview"},{"title":"Get Hotel Stay Totals","api":"GET /v1/hotel-stays/totals","href":"/api-reference/hotel-stays/totals"},{"title":"Hotel Stay Calculation Steps","api":"GET /v1/hotel-stays/{hotel_stay_id}/steps","href":"/api-reference/hotel-stays/impact-calculation"},{"title":"List Available Countries","api":"GET /v1/hotel-stays/available-countries","href":"/api-reference/hotel-stays/available-countries"},{"title":"List Hotel Stays","api":"GET /v1/hotel-stays","href":"/api-reference/hotel-stays/list"},{"title":"Get Hotel Stay","api":"GET /v1/hotel-stays/{hotel_stay_id}","href":"/api-reference/hotel-stays/get"},{"title":"Create Hotel Stay","api":"POST /v1/hotel-stays","deprecated":true,"href":"/api-reference/hotel-stays/create"},{"title":"Create Hotel Stays (v2)","api":"POST /v2/hotel-stays","tag":"BETA","href":"/api-reference/hotel-stays/create-v2"},{"title":"Delete Hotel Stays (v2)","api":"POST /v2/hotel-stays/delete","tag":"BETA","href":"/api-reference/hotel-stays/delete-v2"},{"title":"Update Hotel Stay","api":"PATCH /v1/hotel-stays/{hotel_stay_id}","href":"/api-reference/hotel-stays/update"},{"title":"Delete Hotel Stay","api":"DELETE /v1/hotel-stays/{hotel_stay_id}","deprecated":true,"href":"/api-reference/hotel-stays/delete"},{"title":"Bulk Delete Hotel Stays","api":"POST /v1/hotel-stays/bulk-delete","deprecated":true,"href":"/api-reference/hotel-stays/bulk-delete"},{"title":"Bulk Delete Hotel Stays by Filters","api":"POST /v1/hotel-stays/bulk-delete-by-filters","href":"/api-reference/hotel-stays/bulk-delete-by-filters"},{"title":"CSV Upload","api":"POST /v1/hotel-stays/bulk/csv","deprecated":true,"href":"/api-reference/hotel-stays/csv-upload"},{"title":"Recalculate Hotel Stays","api":"POST /v1/hotel-stays/recalculate","href":"/api-reference/hotel-stays/recalculate"}]},{"group":"Imports","pages":[{"title":"Imports","href":"/api-reference/imports/overview"},{"title":"Get Import Rows","api":"GET /v2/imports/{import_id}/rows","href":"/api-reference/imports/get-rows"},{"title":"Get Import Status","api":"GET /v2/imports/{import_id}/status","href":"/api-reference/imports/get-status"},{"title":"List Import Sessions","api":"GET /v2/imports/sessions","href":"/api-reference/imports/list"},{"title":"Get Provider Options","api":"GET /v2/imports/options/{source_key}","href":"/api-reference/imports/get-options-source"},{"title":"Get Import Template","api":"GET /v2/imports/templates/{template_id}","href":"/api-reference/imports/get-template"},{"title":"Own Workforce Import Templates","href":"/api-reference/imports/own-workforce-templates"},{"title":"Get Unique Values","api":"POST /v2/imports/{import_id}/unique-values","href":"/api-reference/imports/get-unique-values"},{"title":"Confirm Mapping","api":"POST /v2/imports/{import_id}/mapping","href":"/api-reference/imports/confirm-mapping"},{"title":"Create Import Session","api":"POST /v2/imports/sessions","href":"/api-reference/imports/create-session"},{"title":"Delete Import Rows","api":"POST /v2/imports/{import_id}/rows/delete","href":"/api-reference/imports/delete-rows"},{"title":"Submit Import","api":"POST /v2/imports/{import_id}/submit","href":"/api-reference/imports/submit"},{"title":"Suggest Mapping","api":"POST /v2/imports/{import_id}/mapping/suggest","href":"/api-reference/imports/suggest-mapping"},{"title":"Validate Import","api":"POST /v2/imports/{import_id}/validate","href":"/api-reference/imports/validate"},{"title":"Patch Import Rows","api":"PATCH /v2/imports/{import_id}/rows","href":"/api-reference/imports/patch-rows"},{"title":"Delete Import Session","api":"DELETE /v2/imports/sessions/{import_id}","href":"/api-reference/imports/delete-session"}]},{"group":"Ingest Jobs","pages":[{"title":"How Bulk Ingestion Works","tag":"BETA","href":"/api-reference/ingest-jobs/overview"},{"title":"List Ingest Job Items","api":"GET /v2/ingest-jobs/{job_id}/items","tag":"BETA","href":"/api-reference/ingest-jobs/list-items"},{"title":"List Ingest Jobs","api":"GET /v2/ingest-jobs","tag":"BETA","href":"/api-reference/ingest-jobs/list"},{"title":"Get Ingest Job","api":"GET /v2/ingest-jobs/{job_id}","tag":"BETA","href":"/api-reference/ingest-jobs/get"}]},{"group":"Invoices","pages":[{"title":"Invoices API","href":"/api-reference/invoices/overview"},{"title":"Get Invoice Totals","api":"GET /v1/invoices/totals","href":"/api-reference/invoices/totals"},{"title":"List Invoice Filter Options","api":"GET /v1/invoices/filter-options","href":"/api-reference/invoices/filter-options"},{"title":"List Invoices","api":"GET /v1/invoices","href":"/api-reference/invoices/list"},{"title":"List Refrigerant Gases","api":"GET /v1/recharge/gases","href":"/api-reference/invoices/refrigerant-gases-list"},{"title":"List Stationary Fuels","api":"GET /v1/stationary/fuels","href":"/api-reference/invoices/stationary-fuels-list"},{"title":"List Suppliers (v2)","api":"GET /v2/suppliers","href":"/api-reference/invoices/suppliers-list-v2"},{"title":"Get Invoice","api":"GET /v1/invoices/{invoice_id}","href":"/api-reference/invoices/get"},{"title":"Create District Cooling Invoices (v2)","api":"POST /v2/invoices/district-cooling","tag":"BETA","href":"/api-reference/invoices/district-cooling-create-v2"},{"title":"Create District Heating Invoices (v2)","api":"POST /v2/invoices/district-heating","tag":"BETA","href":"/api-reference/invoices/district-heating-create-v2"},{"title":"Create Electricity Invoices (v2)","api":"POST /v2/invoices/electricity","tag":"BETA","href":"/api-reference/invoices/electricity-create-v2"},{"title":"Create Fuel Invoices (v2)","api":"POST /v2/invoices/fuels","tag":"BETA","href":"/api-reference/invoices/fuels-create-v2"},{"title":"Create Invoice","api":"POST /v1/invoices","deprecated":true,"href":"/api-reference/invoices/create"},{"title":"Create Process Invoices (v2)","api":"POST /v2/invoices/process","tag":"BETA","href":"/api-reference/invoices/process-create-v2"},{"title":"Create Refrigerant Invoices (v2)","api":"POST /v2/invoices/refrigerants","tag":"BETA","href":"/api-reference/invoices/refrigerants-create-v2"},{"title":"Create Water Invoices (v2)","api":"POST /v2/invoices/water","tag":"BETA","href":"/api-reference/invoices/water-create-v2"},{"title":"Delete Invoices (v2)","api":"POST /v2/invoices/delete","tag":"BETA","href":"/api-reference/invoices/delete-v2"},{"title":"Replace Invoice","api":"PUT /v1/invoices/{invoice_id}","href":"/api-reference/invoices/replace"},{"title":"Update Invoice","api":"PATCH /v1/invoices/{invoice_id}","href":"/api-reference/invoices/update"},{"title":"Delete Invoice","api":"DELETE /v1/invoices/{invoice_id}","deprecated":true,"href":"/api-reference/invoices/delete"},{"title":"Bulk Delete Invoices","api":"POST /v1/invoices/bulk-delete","deprecated":true,"href":"/api-reference/invoices/bulk-delete"},{"title":"Bulk Delete Invoices by Filters","api":"POST /v1/invoices/bulk-delete-by-filters","href":"/api-reference/invoices/bulk-delete-by-filters"},{"title":"Bulk Update","api":"POST /v1/invoices/bulk-update","href":"/api-reference/invoices/bulk-update"},{"title":"Recalculate Invoices","api":"POST /v1/invoices/recalculate","href":"/api-reference/invoices/recalculate"},{"title":"Create Invoice with PDF Attachment","href":"/api-reference/invoices/invoice-with-pdf"},{"title":"Invoice Comments","href":"/api-reference/invoices/comments"}]},{"group":"Life Cycle Assessment (LCA)","pages":[{"title":"LCA API","href":"/api-reference/lca/overview"},{"title":"Get LCA Calculation Errors","api":"GET /lca/portfolio/{lca_id}/calculation-errors","href":"/api-reference/lca/calculation-errors"},{"title":"Get LCA Dashboard","api":"GET /lca/portfolio/{lca_id}/dashboard","href":"/api-reference/lca/dashboard"},{"title":"List LCA Portfolios","api":"GET /lca/portfolio","href":"/api-reference/lca/list"},{"title":"Get LCA Impacts","api":"GET /lca/impacts/{lca_id}","href":"/api-reference/lca/impacts"},{"title":"Get LCA Portfolio","api":"GET /lca/portfolio/{lca_id}","href":"/api-reference/lca/get"},{"title":"Validate LCA","api":"GET /lca/validate/{lca_id}","href":"/api-reference/lca/validate"},{"title":"Create LCA from Excel","api":"POST /lca/create-from-excel","href":"/api-reference/lca/create-from-excel"},{"title":"Create LCA from JSON","api":"POST /lca/create-from-json","href":"/api-reference/lca/create-from-json"},{"title":"Create LCA Portfolio","api":"POST /v1/lca/portfolio","href":"/api-reference/lca/create"},{"title":"Export LCA to Excel","api":"POST /lca/export-xlsx/{lca_id}","href":"/api-reference/lca/export-xlsx"},{"title":"Update LCA Portfolio","api":"PATCH /lca/portfolio/{lca_id}","href":"/api-reference/lca/update"},{"title":"Delete LCA Portfolio","api":"DELETE /lca/portfolio/{lca_id}","href":"/api-reference/lca/delete"},{"title":"LCA Scenarios","href":"/api-reference/lca/scenarios"}]},{"group":"Logistic Hubs","pages":[{"title":"Logistic Hubs API","href":"/api-reference/logistic-hubs/overview"},{"title":"List Logistic Hubs","api":"GET /v1/logistic-hubs","href":"/api-reference/logistic-hubs/list"},{"title":"Get Logistic Hub","api":"GET /v1/logistic-hubs/{hub_id}","href":"/api-reference/logistic-hubs/get"},{"title":"Create Logistic Hub","api":"POST /v1/logistic-hubs","href":"/api-reference/logistic-hubs/create"},{"title":"Create Logistic Hubs (v2)","api":"POST /v2/logistic-hubs","tag":"BETA","href":"/api-reference/logistic-hubs/create-v2"},{"title":"Update Logistic Hub","api":"PUT /v1/logistic-hubs/{hub_id}","href":"/api-reference/logistic-hubs/update"},{"title":"Delete Logistic Hub","api":"DELETE /v1/logistic-hubs/{hub_id}","href":"/api-reference/logistic-hubs/delete"}]},{"group":"Logistics","pages":[{"title":"Logistics API","href":"/api-reference/logistics/overview"},{"title":"Export Detailed Report","api":"GET /v1/logistics/report/export","href":"/api-reference/logistics/get-report-export"},{"title":"Generate Report","api":"GET /v1/logistics/report","href":"/api-reference/logistics/get-report"},{"title":"Get Logistics Packages (v2)","api":"GET /v2/logistics/packages","tag":"BETA","href":"/api-reference/logistics/get-packages-v2"},{"title":"Get Logistics Summary","api":"GET /v1/logistics/summary","href":"/api-reference/logistics/get-summary"},{"title":"List Available Fuel Types","api":"GET /v1/logistics/fuels","href":"/api-reference/logistics/list-fuels"},{"title":"List Available Vehicle Types","api":"GET /v1/logistics/tocs","href":"/api-reference/logistics/list-tocs"},{"title":"List Clients","api":"GET /v1/logistics/clients","href":"/api-reference/logistics/list-clients"},{"title":"List HOCs","api":"GET /v1/logistics/hocs","href":"/api-reference/logistics/list-hocs"},{"title":"List Logistics Hubs","api":"GET /v1/logistics/hubs","href":"/api-reference/logistics/list-hubs"},{"title":"List Packages","api":"GET /v1/logistics/packages","href":"/api-reference/logistics/list-packages"},{"title":"Get Package by ID","api":"GET /v1/logistics/packages/{package_id}","href":"/api-reference/logistics/get-package"},{"title":"CSV Upload","api":"POST /v1/logistics/upload","href":"/api-reference/logistics/upload"},{"group":"Recharges","expanded":true,"pages":[{"title":"List Logistics Recharges","api":"GET /v1/logistics/recharges","href":"/api-reference/logistics/list-recharges"},{"title":"List Recharge Filter Values","api":"GET /v1/logistics/recharges/unique-values","href":"/api-reference/logistics/recharges-unique-values"},{"title":"Create Logistics Recharge","api":"POST /v1/logistics/recharges","href":"/api-reference/logistics/create-recharge"},{"title":"Delete Logistics Recharge","api":"DELETE /v1/logistics/recharges/{recharge_id}","href":"/api-reference/logistics/delete-recharge"},{"title":"Batch Delete Logistics Recharges","api":"POST /v1/logistics/recharges/batch-delete","href":"/api-reference/logistics/batch-delete-recharges"},{"title":"Bulk Delete Recharges by Filters","api":"POST /v1/logistics/recharges/bulk-delete-by-filters","href":"/api-reference/logistics/recharges-bulk-delete-by-filters"},{"title":"Create Logistics Recharges (Bulk)","api":"POST /v1/logistics/recharges/bulk","href":"/api-reference/logistics/create-recharges-bulk"}]},{"group":"Requests","expanded":true,"pages":[{"title":"List Logistics Requests","api":"GET /v1/logistics/requests","href":"/api-reference/logistics/list-requests"},{"title":"List Shipment Filter Values","api":"GET /v1/logistics/requests/unique-values","href":"/api-reference/logistics/requests-unique-values"},{"title":"Create Logistics Request","api":"POST /v1/logistics/requests","href":"/api-reference/logistics/create-request"},{"title":"Create Logistics Requests (v2)","api":"POST /v2/logistics/requests","tag":"BETA","href":"/api-reference/logistics/create-requests-v2"},{"title":"Delete Logistics Requests (v2)","api":"POST /v2/logistics/requests/delete","tag":"BETA","href":"/api-reference/logistics/delete-requests-v2"},{"title":"Delete Logistics Request","api":"DELETE /v1/logistics/requests/{request_id}","href":"/api-reference/logistics/delete-request"},{"title":"Batch Delete Logistics Requests","api":"POST /v1/logistics/requests/batch-delete","href":"/api-reference/logistics/batch-delete-requests"},{"title":"Bulk Delete Requests by Filters","api":"POST /v1/logistics/requests/bulk-delete-by-filters","href":"/api-reference/logistics/requests-bulk-delete-by-filters"},{"title":"Create Logistics Requests (Bulk)","api":"POST /v1/logistics/requests/bulk","href":"/api-reference/logistics/create-requests-bulk"}]}]},{"group":"Organizations","pages":[{"title":"Organizations API","href":"/api-reference/organizations/overview"},{"title":"Organization Metrics","api":"GET /v1/organizations/{organization_id}/metrics","href":"/api-reference/organizations/metrics"},{"title":"Organization Tree","api":"GET /v2/organizations/tree","href":"/api-reference/organizations/tree"}]},{"group":"Own Workforce","pages":[{"title":"Own Workforce API","href":"/api-reference/own-workforce/overview"},{"title":"Get Workforce Unique Values","api":"GET /v1/own_workforces/unique-values","href":"/api-reference/own-workforce/unique-values"},{"title":"Get Workforce Verification Data","api":"GET /v1/own_workforces/verification-data","href":"/api-reference/own-workforce/verification-data"},{"title":"List Workforce Countries","api":"GET /v1/own_workforces/countries","href":"/api-reference/own-workforce/countries"},{"title":"List Workforce Employees","api":"GET /v1/own_workforces","href":"/api-reference/own-workforce/list"},{"title":"List Workforce Employees With Contracts","api":"GET /v1/own_workforces/with-contracts-and-remunerations","href":"/api-reference/own-workforce/with-contracts"},{"title":"List Workforce Job Categories","api":"GET /v1/own_workforces/job-categories","href":"/api-reference/own-workforce/job-categories"},{"title":"Get Workforce Employee","api":"GET /v1/own_workforces/{own_workforce_id}","href":"/api-reference/own-workforce/get"},{"title":"Create Workforce Employees (v2)","api":"POST /v2/own-workforce/employees","tag":"BETA","href":"/api-reference/own-workforce/employees-create-v2"},{"title":"Delete Workforce Employees (v2)","api":"POST /v2/own-workforce/employees/delete","tag":"BETA","href":"/api-reference/own-workforce/employees-delete-v2"},{"title":"Delete Workforce Employee","api":"DELETE /v1/own_workforces/{own_workforce_id}","deprecated":true,"href":"/api-reference/own-workforce/delete"},{"title":"Bulk Delete Workforce Employees","api":"POST /v1/own_workforces/bulk-delete","deprecated":true,"href":"/api-reference/own-workforce/bulk-delete"},{"title":"Bulk Delete Workforce Employees by Filters","api":"POST /v1/own_workforces/bulk-delete-by-filters","href":"/api-reference/own-workforce/bulk-delete-by-filters"},{"title":"Upload Workforce Employees CSV","api":"POST /v1/own_workforces/bulk/csv","deprecated":true,"href":"/api-reference/own-workforce/csv-upload"},{"group":"Absenteeisms \u0026 Accidents","expanded":true,"pages":[{"title":"Get Workforce Absences Unique Values","api":"GET /v1/own_workforce_absenteeisms_accidents/unique-values","href":"/api-reference/own-workforce/unique-values-absences"},{"title":"List Workforce Absences","api":"GET /v1/own_workforce_absenteeisms_accidents","href":"/api-reference/own-workforce/list-absences"},{"title":"List Workforce Absences Paginated","api":"GET /v1/own_workforce_absenteeisms_accidents/paginated","href":"/api-reference/own-workforce/list-absences-paginated"},{"title":"List Workforce Absences by Employee","api":"GET /v1/own_workforce_absenteeisms_accidents/own_workforce/{own_workforce_id}","href":"/api-reference/own-workforce/list-absences-by-employee"},{"title":"Create Workforce Absences (v2)","api":"POST /v2/own-workforce/absences","tag":"BETA","href":"/api-reference/own-workforce/absences-create-v2"},{"title":"Delete Workforce Absences (v2)","api":"POST /v2/own-workforce/absences/delete","tag":"BETA","href":"/api-reference/own-workforce/absences-delete-v2"},{"title":"Delete Workforce Absence","api":"DELETE /v1/own_workforce_absenteeisms_accidents/{absenteeism_accident_id}","deprecated":true,"href":"/api-reference/own-workforce/delete-absence"},{"title":"Bulk Delete Workforce Absences","api":"POST /v1/own_workforce_absenteeisms_accidents/bulk-delete","deprecated":true,"href":"/api-reference/own-workforce/bulk-delete-absences"},{"title":"Bulk Delete Workforce Absences by Filters","api":"POST /v1/own_workforce_absenteeisms_accidents/bulk-delete-by-filters","href":"/api-reference/own-workforce/bulk-delete-absences-by-filters"},{"title":"Upload Workforce Absences CSV","api":"POST /v1/own_workforce_absenteeisms_accidents/bulk/csv","deprecated":true,"href":"/api-reference/own-workforce/csv-upload-absences"}]},{"group":"Contracts \u0026 Remuneration","expanded":true,"pages":[{"title":"List Workforce Contracts","api":"GET /v1/own_workforce_contracts","href":"/api-reference/own-workforce/list-contracts"},{"title":"List Workforce Remunerations","api":"GET /v1/own_workforce_remunerations","href":"/api-reference/own-workforce/list-remunerations"},{"title":"Get Workforce Contract","api":"GET /v1/own_workforce_contracts/{contract_id}","href":"/api-reference/own-workforce/get-contract"}]},{"group":"Trainings","expanded":true,"pages":[{"title":"Get Workforce Trainings Unique Values","api":"GET /v1/own_workforce_trainings/unique-values","href":"/api-reference/own-workforce/unique-values-trainings"},{"title":"List Workforce Trainings","api":"GET /v1/own_workforce_trainings","href":"/api-reference/own-workforce/list-trainings"},{"title":"List Workforce Trainings Paginated","api":"GET /v1/own_workforce_trainings/paginated","href":"/api-reference/own-workforce/list-trainings-paginated"},{"title":"List Workforce Trainings by Employee","api":"GET /v1/own_workforce_trainings/own_workforce/{own_workforce_id}","href":"/api-reference/own-workforce/list-trainings-by-employee"},{"title":"Create Workforce Trainings (v2)","api":"POST /v2/own-workforce/trainings","tag":"BETA","href":"/api-reference/own-workforce/trainings-create-v2"},{"title":"Delete Workforce Trainings (v2)","api":"POST /v2/own-workforce/trainings/delete","tag":"BETA","href":"/api-reference/own-workforce/trainings-delete-v2"},{"title":"Delete Workforce Training","api":"DELETE /v1/own_workforce_trainings/{training_id}","deprecated":true,"href":"/api-reference/own-workforce/delete-training"},{"title":"Bulk Delete Workforce Trainings","api":"POST /v1/own_workforce_trainings/bulk-delete","deprecated":true,"href":"/api-reference/own-workforce/bulk-delete-trainings"},{"title":"Bulk Delete Workforce Trainings by Filters","api":"POST /v1/own_workforce_trainings/bulk-delete-by-filters","href":"/api-reference/own-workforce/bulk-delete-trainings-by-filters"},{"title":"Upload Workforce Trainings CSV","api":"POST /v1/own_workforce_trainings/bulk/csv","deprecated":true,"href":"/api-reference/own-workforce/csv-upload-trainings"}]}]},{"group":"Projects","pages":[{"title":"Projects API","href":"/api-reference/projects/overview"},{"title":"Consolidated Emissions","api":"GET /v1/projects/{project_id}/consolidated","href":"/api-reference/projects/consolidated"},{"title":"List Projects","api":"GET /v1/projects/extended","href":"/api-reference/projects/list"},{"title":"Recent Activities","api":"GET /v1/projects/{project_id}/recent-activities","href":"/api-reference/projects/recent-activities"},{"title":"Get Project","api":"GET /v1/projects/{project_id}","href":"/api-reference/projects/get"},{"title":"Create Project","api":"POST /v1/projects","href":"/api-reference/projects/create"},{"title":"Link Entities by Filters","api":"POST /v1/projects/{project_id}/entities/link-by-filters","href":"/api-reference/projects/link-by-filters"},{"title":"Link Entities to Project","api":"POST /v1/projects/{project_id}/entities/link","href":"/api-reference/projects/link-entities"},{"title":"Unlink Entities from Project","api":"POST /v1/projects/{project_id}/entities/unlink","href":"/api-reference/projects/unlink-entities"},{"title":"Update Project","api":"PUT /v1/projects/{project_id}","href":"/api-reference/projects/update"},{"title":"Delete Project","api":"DELETE /v1/projects/{project_id}","href":"/api-reference/projects/delete"},{"group":"Tasks","expanded":true,"pages":[{"title":"Get Subtasks","api":"GET /v1/tasks/{task_id}/subtasks","href":"/api-reference/projects/subtasks"},{"title":"List All Tasks","api":"GET /v1/projects/tasks","href":"/api-reference/projects/list-tasks"},{"title":"List Project Tasks","api":"GET /v1/projects/{project_id}/tasks","href":"/api-reference/projects/project-tasks"},{"title":"Task Versions","api":"GET /v1/tasks/{task_id}/versions","href":"/api-reference/projects/task-versions"},{"title":"Get Task","api":"GET /v1/tasks/{task_id}","href":"/api-reference/projects/get-task"},{"title":"Create Task","api":"POST /v2/tasks","href":"/api-reference/projects/create-task"},{"title":"Update Task","api":"PATCH /v1/tasks/{task_id}","href":"/api-reference/projects/update-task"},{"title":"Delete Task","api":"DELETE /v1/tasks/{task_id}","href":"/api-reference/projects/delete-task"}]}]},{"group":"Purchases","pages":[{"title":"Purchases API","href":"/api-reference/purchases/overview"},{"title":"Get Purchase Totals","api":"GET /v1/purchases/totals","href":"/api-reference/purchases/totals"},{"title":"Get Purchase Version History","api":"GET /v1/purchases/{purchase_id}/versions","href":"/api-reference/purchases/versions"},{"title":"List Purchase Suppliers","api":"GET /v1/purchases/suppliers","href":"/api-reference/purchases/suppliers-list"},{"title":"List Purchases","api":"GET /v1/purchases","href":"/api-reference/purchases/list"},{"title":"Get Purchase","api":"GET /v1/purchases/{purchase_id}","href":"/api-reference/purchases/get"},{"title":"Create Purchase","api":"POST /v1/purchases","deprecated":true,"href":"/api-reference/purchases/create"},{"title":"Create Purchase Suppliers (v2)","api":"POST /v2/purchases/suppliers","tag":"BETA","href":"/api-reference/purchases/suppliers-create-v2"},{"title":"Create Purchases (v2)","api":"POST /v2/purchases","tag":"BETA","href":"/api-reference/purchases/create-v2"},{"title":"Delete Purchase Suppliers (v2)","api":"POST /v2/purchases/suppliers/delete","tag":"BETA","href":"/api-reference/purchases/suppliers-delete-v2"},{"title":"Delete Purchases (v2)","api":"POST /v2/purchases/delete","tag":"BETA","href":"/api-reference/purchases/delete-v2"},{"title":"Classify Purchase Suppliers (v2)","api":"PATCH /v2/purchases/suppliers","tag":"BETA","href":"/api-reference/purchases/suppliers-update-v2"},{"title":"Update Purchase","api":"PATCH /v1/purchases/{purchase_id}","href":"/api-reference/purchases/update"},{"title":"Delete Purchase","api":"DELETE /v1/purchases/{purchase_id}","deprecated":true,"href":"/api-reference/purchases/delete"},{"title":"Bulk Delete Purchases","api":"POST /v1/purchases/bulk-delete","deprecated":true,"href":"/api-reference/purchases/bulk-delete"},{"title":"Bulk Delete Purchases by Filters","api":"POST /v1/purchases/bulk-delete-by-filters","href":"/api-reference/purchases/bulk-delete-by-filters"}]},{"group":"Reports \u0026 Dashboards (v1)","pages":[{"title":"Reports \u0026 Dashboards API","href":"/api-reference/reports/overview"},{"title":"Get Kpis","deprecated":null,"version":null,"openapi":"/openapi-kpi.json get /v1/report_builder/kpis","href":"/api-reference/reportbuilder/get-kpis"}]},{"group":"Sold Products","pages":[{"title":"Sold Products API","href":"/api-reference/sold-products/overview"},{"title":"Check Period Overlap","api":"GET /v1/sold-products/periods/check-overlap","href":"/api-reference/sold-products/check-overlap"},{"title":"List Existing Country Sales","api":"GET /v1/sold-products/existing-country-sales","href":"/api-reference/sold-products/existing-country-sales"},{"title":"List Periods","api":"GET /v1/sold-products/{sold_product_id}/periods","href":"/api-reference/sold-products/list-periods"},{"title":"List Sold Products","api":"GET /v1/sold-products/","href":"/api-reference/sold-products/list"},{"title":"Period Country Sales","api":"GET /v1/sold-products/{sold_product_id}/periods/{period_id}/country-sales","href":"/api-reference/sold-products/country-sales"},{"title":"Period Emissions","api":"GET /v1/sold-products/{sold_product_id}/periods/{period_id}/emissions","href":"/api-reference/sold-products/emissions"},{"title":"Create Sold Products (v2)","api":"POST /v2/sold-products","tag":"BETA","href":"/api-reference/sold-products/create-v2"},{"title":"Delete Sold Products (v2)","api":"POST /v2/sold-products/delete","tag":"BETA","href":"/api-reference/sold-products/delete-v2"},{"title":"Delete Period","api":"DELETE /v1/sold-products/{sold_product_id}/periods/{period_id}","href":"/api-reference/sold-products/delete-period"},{"title":"Delete Sold Product","api":"DELETE /v1/sold-products/{sold_product_id}","deprecated":true,"href":"/api-reference/sold-products/delete"},{"group":"Use of Sold Products","expanded":true,"pages":[{"title":"Create Use of Sold Products (v2)","api":"POST /v2/use-of-sold-products","tag":"BETA","href":"/api-reference/use-of-sold-products/create-v2"},{"title":"Delete Use of Sold Products (v2)","api":"POST /v2/use-of-sold-products/delete","tag":"BETA","href":"/api-reference/use-of-sold-products/delete-v2"}]}]},{"group":"Transport","pages":[{"title":"Transport API","href":"/api-reference/transport/overview"},{"title":"Get Route Counts","api":"GET /v1/transports/counts","href":"/api-reference/transport/counts"},{"title":"Get Transport Route Totals","api":"GET /v1/transports/totals","href":"/api-reference/transport/totals"},{"title":"Get Transport Route Version History","api":"GET /v1/transports/{transport_route_id}/versions","href":"/api-reference/transport/versions"},{"title":"List Transport Combinations","api":"GET /v1/transports/combinations","href":"/api-reference/transport/combinations"},{"title":"List Transport Routes","api":"GET /v1/transports","href":"/api-reference/transport/list"},{"title":"Get Transport Route","api":"GET /v1/transports/{transport_route_id}","href":"/api-reference/transport/get"},{"title":"Create Freight Transports (v2)","api":"POST /v2/transports","tag":"BETA","href":"/api-reference/transport/create-v2"},{"title":"Create Transport Route","api":"POST /v1/transports","deprecated":true,"href":"/api-reference/transport/create"},{"title":"Delete Freight Transports (v2)","api":"POST /v2/transports/delete","tag":"BETA","href":"/api-reference/transport/delete-v2"},{"title":"Update Transport Route","api":"PUT /v1/transports/{transport_route_id}","href":"/api-reference/transport/update"},{"title":"Update Transport Route Attachment","api":"PATCH /v1/transports/{transport_route_id}","href":"/api-reference/transport/update-attachment"},{"title":"Delete Transport Route","api":"DELETE /v1/transports/{transport_route_id}","deprecated":true,"href":"/api-reference/transport/delete"},{"title":"Bulk Delete Transport Routes","api":"POST /v1/transports/bulk-delete","deprecated":true,"href":"/api-reference/transport/bulk-delete"},{"title":"Bulk Delete Transport Routes by Filters","api":"POST /v1/transports/bulk-delete-by-filters","href":"/api-reference/transport/bulk-delete-by-filters"},{"title":"Get Presigned Upload URL","api":"POST /v1/transports/upload/presigned-url","deprecated":true,"href":"/api-reference/transport/presigned-url"},{"title":"Upload Transport File","api":"POST /v1/transports/upload","deprecated":true,"href":"/api-reference/transport/upload"},{"title":"Transport Type Inference (do_not_know)","href":"/api-reference/transport/do-not-know-inference"}]},{"group":"Units","pages":[{"title":"List Units","api":"GET /v2/units","href":"/api-reference/units/list"}]},{"group":"Vehicles","pages":[{"title":"Vehicles API","href":"/api-reference/vehicles/overview"},{"title":"List Market Segments","api":"GET /v1/vehicles/market_segments","href":"/api-reference/vehicles/market-segments"},{"title":"List Vehicles","api":"GET /v1/vehicles","href":"/api-reference/vehicles/list"},{"title":"Vehicle Versions","api":"GET /v1/vehicles/{vehicle_id}/versions","href":"/api-reference/vehicles/versions"},{"title":"Get Vehicle","api":"GET /v1/vehicles/{vehicle_id}","href":"/api-reference/vehicles/get"},{"title":"Create Vehicle","api":"POST /v1/vehicles","deprecated":true,"href":"/api-reference/vehicles/create"},{"title":"Create Vehicles (v2)","api":"POST /v2/vehicles","tag":"BETA","href":"/api-reference/vehicles/create-v2"},{"title":"Delete Vehicles (v2)","api":"POST /v2/vehicles/delete","tag":"BETA","href":"/api-reference/vehicles/delete-v2"},{"title":"Update Vehicle","api":"PATCH /v1/vehicles/{vehicle_id}","href":"/api-reference/vehicles/update"},{"title":"Delete Vehicle","api":"DELETE /v1/vehicles/{vehicle_id}","deprecated":true,"href":"/api-reference/vehicles/delete"},{"title":"Bulk Delete Vehicles","api":"POST /v1/vehicles/bulk-delete","deprecated":true,"href":"/api-reference/vehicles/bulk-delete"},{"title":"Bulk Delete Vehicles by Filters","api":"POST /v1/vehicles/bulk-delete-by-filters","href":"/api-reference/vehicles/bulk-delete-by-filters"},{"title":"CSV Import","api":"POST /v1/vehicles/bulk/csv","deprecated":true,"href":"/api-reference/vehicles/csv-import"},{"group":"Unknown Vehicles","expanded":true,"pages":[{"title":"Unknown Vehicles API","href":"/api-reference/unknown-vehicles/overview"},{"title":"List Unknown Vehicles","api":"GET /v1/unknown-vehicles","href":"/api-reference/unknown-vehicles/list"}]},{"group":"Vehicle Consumptions","expanded":true,"pages":[{"title":"Consumption Calculation Steps","api":"GET /v1/vehicle_consumptions/{vehicle_consumption_id}/steps","href":"/api-reference/vehicles/consumptions-steps"},{"title":"Consumption Totals (Organization)","api":"GET /v2/vehicle_consumptions/totals","href":"/api-reference/vehicles/consumptions-org-totals"},{"title":"List All Vehicle Consumptions (Organization)","api":"GET /v2/vehicle_consumptions","href":"/api-reference/vehicles/consumptions-org-list"},{"title":"List Consumption Filter Values","api":"GET /v1/vehicles/{vehicle_id}/consumptions/unique-values","href":"/api-reference/vehicles/consumptions-unique-values"},{"title":"List Consumption Filter Values (Organization)","api":"GET /v2/vehicle_consumptions/unique-values","href":"/api-reference/vehicles/consumptions-org-unique-values"},{"title":"Vehicle Consumptions","api":"GET /v1/vehicles/{vehicle_id}/consumptions","href":"/api-reference/vehicles/consumptions"},{"title":"Get Consumption","api":"GET /v1/vehicle_consumptions/{vehicle_consumption_id}","href":"/api-reference/vehicles/consumptions-get"},{"title":"Create Vehicle Consumptions (v2)","api":"POST /v2/vehicle-consumptions","tag":"BETA","href":"/api-reference/vehicles/consumptions-create-v2"},{"title":"Delete Vehicle Consumptions (v2)","api":"POST /v2/vehicle-consumptions/delete","tag":"BETA","href":"/api-reference/vehicles/consumptions-delete-v2"},{"title":"Delete Vehicle Consumption","api":"DELETE /v1/vehicle_consumptions/{vehicle_consumption_id}","deprecated":true,"href":"/api-reference/vehicles/consumptions-delete"},{"title":"Delete Vehicle Consumptions by File","api":"DELETE /v1/vehicle_consumptions/by-file/{file_id}","href":"/api-reference/vehicles/consumptions-delete-by-file"},{"title":"Bulk Delete Vehicle Consumptions","api":"POST /v1/vehicles/{vehicle_id}/consumptions/bulk-delete","deprecated":true,"href":"/api-reference/vehicles/consumptions-bulk-delete"},{"title":"Bulk Delete Vehicle Consumptions (Organization)","api":"POST /v2/vehicle_consumptions/bulk-delete","deprecated":true,"href":"/api-reference/vehicles/consumptions-org-bulk-delete"},{"title":"Bulk Delete Vehicle Consumptions by Filters","api":"POST /v1/vehicles/{vehicle_id}/consumptions/bulk-delete-by-filters","href":"/api-reference/vehicles/consumptions-bulk-delete-by-filters"},{"title":"Bulk Delete Vehicle Consumptions by Filters (Organization)","api":"POST /v2/vehicle_consumptions/bulk-delete-by-filters","href":"/api-reference/vehicles/consumptions-org-bulk-delete-by-filters"},{"title":"Consumptions CSV Import","api":"POST /v1/vehicle_consumptions/bulk/csv","deprecated":true,"href":"/api-reference/vehicles/consumptions-csv-import"}]},{"group":"Vehicle Fuels","expanded":true,"pages":[{"title":"Vehicle Fuels API","href":"/api-reference/vehicle-fuels/overview"},{"title":"List Vehicle Fuels","api":"GET /v1/vehicle-fuels","href":"/api-reference/vehicle-fuels/list"}]}]},{"group":"Waste Water Treatments","pages":[{"title":"Get Waste Water Treatment by ID","api":"GET /v1/waste-water-treatments/{wwt_id}/detail","href":"/api-reference/waste-water-treatments/detail"},{"title":"Get Waste Water Treatment Version History","api":"GET /v1/waste-water-treatments/{waste_water_treatment_id}/versions","href":"/api-reference/waste-water-treatments/versions"},{"title":"List Waste Water Treatments","api":"GET /v1/waste-water-treatments","href":"/api-reference/waste-water-treatments/list"},{"title":"Create Waste Water Treatment","api":"POST /v1/waste-water-treatments","deprecated":true,"href":"/api-reference/waste-water-treatments/create"},{"title":"Create Waste Water Treatments (v2)","api":"POST /v2/waste-water-treatments","tag":"BETA","href":"/api-reference/waste-water-treatments/create-v2"},{"title":"Delete Waste Water Treatments (v2)","api":"POST /v2/waste-water-treatments/delete","tag":"BETA","href":"/api-reference/waste-water-treatments/delete-v2"},{"title":"Update Waste Water Treatment","api":"PATCH /v1/waste-water-treatments/{wwt_id}","href":"/api-reference/waste-water-treatments/update"}]},{"group":"Wastes","pages":[{"title":"Wastes API","href":"/api-reference/wastes/overview"},{"title":"Get Waste","api":"GET /v1/wastes/{waste_id}/detail","href":"/api-reference/wastes/get"},{"title":"Get Waste Version History","api":"GET /v1/wastes/{waste_id}/versions","href":"/api-reference/wastes/versions"},{"title":"List LER Codes","api":"GET /v1/wastes/ler-codes","href":"/api-reference/wastes/ler-codes"},{"title":"List R/D Codes","api":"GET /v1/wastes/rd-codes","href":"/api-reference/wastes/rd-codes"},{"title":"List Waste Emission Factors","api":"GET /v1/waste-efs","href":"/api-reference/wastes/emission-factors"},{"title":"List Waste Filter Values","api":"GET /v1/waste/unique-values","href":"/api-reference/wastes/unique-values"},{"title":"List Wastes","api":"GET /v1/wastes","href":"/api-reference/wastes/list"},{"title":"Create Waste","api":"POST /v1/wastes","description":"Create a new waste record for a facility","deprecated":true,"href":"/api-reference/wastes/create"},{"title":"Create Wastes (v2)","api":"POST /v2/wastes","tag":"BETA","href":"/api-reference/wastes/create-v2"},{"title":"Delete Wastes (v2)","api":"POST /v2/wastes/delete","description":"Delete up to 5,000 wastes by id, asynchronously, as an ingest job","tag":"BETA","href":"/api-reference/wastes/delete-v2"},{"title":"Update Waste","api":"PATCH /v1/wastes/{waste_id}","href":"/api-reference/wastes/update"},{"title":"Bulk Delete Wastes","api":"POST /v1/waste/bulk-delete","deprecated":true,"href":"/api-reference/wastes/bulk-delete"},{"title":"Bulk Delete Wastes by Filters","api":"POST /v1/waste/bulk-delete-by-filters","href":"/api-reference/wastes/bulk-delete-by-filters"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","tag":"BETA","href":"/api-reference/webhooks/overview"},{"title":"List Webhook Deliveries","api":"GET /v2/webhook-endpoints/{endpoint_id}/deliveries","tag":"BETA","href":"/api-reference/webhooks/list-deliveries"},{"title":"List Webhook Endpoints","api":"GET /v2/webhook-endpoints","tag":"BETA","href":"/api-reference/webhooks/list-endpoints"},{"title":"Get Webhook Endpoint","api":"GET /v2/webhook-endpoints/{endpoint_id}","tag":"BETA","href":"/api-reference/webhooks/get-endpoint"},{"title":"Create Webhook Endpoint","api":"POST /v2/webhook-endpoints","tag":"BETA","href":"/api-reference/webhooks/create-endpoint"},{"title":"Retry Webhook Delivery","api":"POST /v2/webhook-endpoints/{endpoint_id}/deliveries/{delivery_id}/retry","tag":"BETA","href":"/api-reference/webhooks/retry-delivery"},{"title":"Rotate Webhook Secret","api":"POST /v2/webhook-endpoints/{endpoint_id}/rotate-secret","tag":"BETA","href":"/api-reference/webhooks/rotate-secret"},{"title":"Send Test Event","api":"POST /v2/webhook-endpoints/{endpoint_id}/test","tag":"BETA","href":"/api-reference/webhooks/test-endpoint"},{"title":"Update Webhook Endpoint","api":"PATCH /v2/webhook-endpoints/{endpoint_id}","tag":"BETA","href":"/api-reference/webhooks/update-endpoint"},{"title":"Delete Webhook Endpoint","api":"DELETE /v2/webhook-endpoints/{endpoint_id}","tag":"BETA","href":"/api-reference/webhooks/delete-endpoint"}]}]},{"version":"Legacy API","pages":[{"title":"Legacy API","href":"/api-reference/legacy/wastes/codes"}]}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/docs/release-notes"}]}]},"basePath":"","title":"Create Wastes (v2) - Dcycle Platform Docs","buildId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","deploymentId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DbeN8Wo6.js","utils-CwSb5Doc.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BmREeM3N.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-AYjWerCj.js","snippetPresets-QD4ULQlp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-Digj5cjF.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CiHrzluR.js","shallow-D7h7pFGg.js","getApiPlaygroundDisplay-mlxkpAUf.js","CodeSnippet-D2rH5lZI.js","CodeSnippets-B53ulOaL.js","Page-CqcDm2To.js","getPastedJson-DxGeNMih.js","icon-BHbyrebp.js","MethodPill-C7F_KEEJ.js","DuplicateIcon-j3c5-73z.js","createIcon-OvCnyFqD.js","DynamicMarkdown-DpAS3GCb.js","SectionHeading-DMPpdrvW.js","axios-vUo_bRtp.js"]}