The API returned 200, but stock did not change: investigating User Products integrations
A 200 response does not end the investigation. Understand the multi-origin inventory scenario and how to verify outcomes, drawing on real packaging and variant-conversion experiences.
Voices depend on your browser and device; some require internet access. Code blocks are not read aloud.
There is one message that usually brings relief to anyone working on integrations: 200 OK.
The request finished, the response arrived, and the system apparently did what it needed to do. It is tempting to mark the task as complete and move on. Until someone opens the listing and asks, “Why is the stock still the same?”
This kind of situation calls for investigating the entire sequence. The response code is important evidence, but we need to understand which operation was executed and which result we are trying to confirm.
At Oombe, I work on integrations and workflows such as listing creation and transfers. Two experiences I have described help explain this concern: packaging data that did not persist after an update accepted by the API, and a listing copy in which 56 variants resulted in 24 listings in the same family.
These were different situations, with causes that had not been confirmed in those accounts. What they share is a practical question: how do we demonstrate that the expected result actually happened?
What the 200 answers
The HTTP specification defines 200 as a successful request. To interpret the result, we also need to consider the operation and the response received. [1]
During an investigation, I would separate three questions:
- Was the request sent as we intended?
- What operation did the service report performing?
- Does the observed state satisfy the business objective?
Consider an illustrative example: an operator wants ten units available at a particular stock location. The application sends an update, receives a success response, and displays a green notification.
To conclude that the objective was met, we still need to connect the request to the correct account, product, and location. We also need to consider what happened between the update and the later query.
The green notification may be accurate about the request but incomplete about the business operation. The solution starts with making explicit what each message confirms.
Mercado Livre documents a specific scenario
The official FAQ states that, for accounts with multi-origin inventory, changing available_quantity through /items can return 200 without updating actual stock. It recommends checking the configuration and using the appropriate location-based inventory workflow. This behavior should not be generalized to every account. [2]
That scope matters. Finding a possible explanation in the documentation helps form a hypothesis. To apply it to a particular case, we still need to check whether that account fits the described scenario.
It also helps to distinguish the entities. The documentation describes an item as a listing with sales conditions, and a User Product as the physical product represented at the most specific variant level. [3]
I would start by mapping those relationships before changing the code. Which product is involved? Which listing are we observing? Which stock location are we discussing? Which information should change?
“Listing stock” sounds simple in conversation. For the system, we need to identify exactly which state that phrase represents in that context.
The packaging case: observe without inventing a cause
In one episode I described, an update to packaging weight or dimensions received a 200 response, but the data did not persist as expected.
That account describes an observed outcome. I did not have a proven cause and correction to present. There is also no basis for automatically attributing it to the User Products model.
The investigation I would pursue starts by preserving the previous value, the intended change, the content sent, the response, and subsequent queries. Without that, it is difficult to distinguish “it did not change” from “it changed and then changed again.”
Next, I would examine separate hypotheses: does the field represent the intended information? Does the subsequent query observe the same object? Is another authorized routine updating this data? Is there a documented rule applicable to the category or account model?
These are diagnostic questions, not conclusions about that episode.
The distinction matters because resending the same update ten times may produce ten identical responses without explaining anything new. The number of attempts cannot replace an evidence trail. Not even when the tenth attempt comes with a stern conversation with the monitor.
The case of 56 variants and 24 listings
In the other case, the intention was to copy a listing with 56 variants, converting its structure into listings under the User Products model. The observed result was 24 listings in the same family. That left 32 listings missing relative to the expected outcome.
The arithmetic identifies the gap, but it does not show where the gap arose.
I would need to check which variants entered the operation, which were prepared for submission, which had a recorded attempt, and which results could be located afterward.
A list of 56 inputs does not prove that 56 requests were made. Likewise, seeing 24 results in a query does not, by itself, prove that no other results exist. We need to verify the query's scope and the correspondence between source and destination.
I would create one row per source variant, with a stable identity and its known outcome. That would make it possible to find the first point at which each of the 32 unresolved entries lost its corresponding evidence.
The cause of this case had not been confirmed either. Different groups of unresolved entries might have different explanations. Before retrying, I would separate what was rejected, what was never sent, and what still needed to be located.
Before fixing anything, identify what you are comparing
In practice, I would prepare a short record of the operation: account, product, listing, variant where applicable, location, and the update's objective.
Those identifiers need clearly defined roles. Using only the listing title to connect results is fragile: titles can be similar, and the same description may apply to different variants.
I would also record the relevant account configuration and logistics model checked against current documentation. The presence of a User Product identifier alone would not be my sole evidence for selecting an inventory workflow.
Another necessary question is who maintains the information we are reading. We may be comparing a local intention with a screen still displaying earlier data, or with a query whose scope differs from what we expected. That needs investigation in each case.
To me, a fix starts becoming convincing when I can complete this sentence: “We wanted to change this state, in this object, under these conditions, and we verified the result this way.”
Without that sentence, it is easy to fix the wrong place and celebrate too early.
Acceptance, confirmation, and reconciliation are different stages
I would design the operation with states that represent what we actually know. “Sent” records an attempt. “Response received” records a return. “Confirmed” requires evidence that matches the objective.
When that evidence is missing, I prefer an explicit pending state. That prevents an absence of information from becoming success or failure merely for convenience.
The reasoning could look like this illustrative pseudocode:
intent = record_objective_and_identities()
response = execute_compatible_workflow()
store_evidence(intent, response)
if response_indicates_rejection:
mark_rejected_with_reason()
else:
current = query_relevant_state()
if objective_met(intent, current):
mark_confirmed()
else:
mark_pending_reconciliation()
The functions represent responsibilities to implement. Choosing actual resources depends on the account, the operation, and the relevant documentation.
“Objective met” also needs a careful definition. For a listing, it may mean finding the correct correspondence. For inventory, it requires considering location, query time, and subsequent events. Comparing two numbers without that context can lead to an incorrect diagnosis.
Time also matters in the investigation
Suppose, in a fictional scenario, the operation aims to make ten units available. The update happens, and shortly afterward a sale reduces availability to nine.
A later query that finds nine does not, by itself, demonstrate that the update failed. It may be observing a legitimate change that happened afterward. To understand the outcome, I would need to connect timestamps, events, and the operation's rules.
The reverse situation also deserves care. Finding the expected number does not automatically prove that this particular attempt produced it; the state might already have been the same beforehand.
That is why I would preserve the previous state and avoid treating a single query as the complete story.
There is also concurrency control. In the documented distributed-inventory resources, Mercado Livre uses x-version; a stale version can produce a 409 conflict, requiring another query before proceeding. [4]
That is a different case from receiving 200 without observing the intended change. Each symptom needs its own line of investigation. Combining everything under “the API is acting weird” makes the conversation shorter and the diagnosis much longer.
Reconciliation means accounting for the correspondences
I would use a reconciliation table to connect each intention with its known outcome. It does not need to start with a sophisticated tool. The essential requirement is being able to explain what is missing and why.
| Observed situation | How I would handle it |
|---|---|
| Result found and consistent with the intention | Record the evidence and complete that unit |
| Identified rejection | Correct the demonstrated cause before retrying |
| Recorded attempt, unknown result | Investigate the destination before repeating it |
| Input with no recorded attempt | Check why processing did not reach it |
For the variants case, the unit would be each source variant and its expected counterpart. For the packaging case, it would be the requested change and the evidence of the observed state.
The table also helps avoid a trap: repeating an entire operation because part of it remains unresolved. Results already confirmed need to be preserved.
Reprocessing only what has been identified as necessary depends on good records. Without them, the application is left guessing what already happened, which is usually an expensive way to save on recordkeeping.
What to retain so you can explain the problem
I would prioritize records that allow the operation to be reconstructed: an internal attempt identifier, timestamp, relevant identities, objective, relevant submitted content, and the response received.
For the subsequent read, I would store the resource queried, the time of the query, and the state found. When the service provides a request identifier, it may also help connect evidence during an investigation.
These records need to exclude credentials and limit personal data to what is necessary. Useful records should explain the problem without turning diagnostics into an unnecessary copy of the entire account.
I would also separate facts from hypotheses. “We received 200 and the next query showed the previous value” is an observation. “The marketplace erased the data” proposes an explanation that requires additional evidence.
That distinction improves both internal investigation and a potential support ticket. The more clearly we can show what we know, the easier it becomes to identify what remains to be discovered.
How I would validate a correction
After finding a demonstrable cause, I would choose a controlled case and a verifiable objective. The change should address the investigated hypothesis without modifying several parts of the workflow at once.
I would compare the previous state, the execution, and the result. Then I would observe whether the correction remains valid across the configurations for which it is intended.
I would also include a case where the previous behavior should continue to work. A correction for a multi-origin account should not be applied indiscriminately to different configurations.
For publishing, I would check correspondences and result integrity, not just the total. Getting 56 results with two duplicated entries and two missing ones would still be a problem, even if the counter displayed a pleasing number.
These are the criteria I would use to validate a solution. A correction would only be demonstrated when that body of evidence completed the explanation of the case.
The best result is being able to demonstrate what happened
Experience with integrations has made me value an unglamorous skill: explaining an operation from beginning to end.
A good diagnosis shows what was intended, which path was used, what responses arrived, and how the result was verified. It also allows us to acknowledge when we still lack enough evidence to close the issue.
User Products and multi-origin inventory make that need particularly visible, because the account configuration and relationships between entities are part of the problem. But the reasoning applies to many integrations.
As systems such as Oombe evolve, I consider this care essential to turning actions into results that can be checked. The operator needs to understand whether something was sent, confirmed, or remains pending.
200 OK is still good news. I simply like to accompany it with an even better message: “We checked the result, and here is the evidence.”
Sources
[1] IETF — RFC 9110, section 15.3.1: 200 OK. HTTP semantics.
[2] Mercado Livre Developers — Multi-origin inventory management / User Products. Inventory-update scenario for multi-origin accounts.
[3] Mercado Livre Developers — User Products. Definitions of the item and User Product entities.
[4] Mercado Livre Developers — Distributed inventory. Version control and conflict handling in the documented resources.