{"openapi":"3.1.0","info":{"title":"Only Partz Partner API","version":"2026-12-04","description":"For listing tools that keep a seller's used-parts inventory on Only Partz. A key belongs to one seller and one listing tool. At most 120 requests a minute per connection. Money is whole US cents."},"servers":[{"url":"https://www.onlypartz.com/api/v1"}],"security":[{"sellerKey":[]}],"paths":{"/connection":{"get":{"summary":"Check the key","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Connection"},"requestId":{"type":"string"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/categories":{"get":{"summary":"Part types","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Categories"},"requestId":{"type":"string"}}}}}}}}},"/listings":{"get":{"summary":"List this connection's listings","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ListingPage"},"requestId":{"type":"string"}}}}}}}}},"/listings/{externalId}":{"parameters":[{"name":"externalId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:\\-]{1,80}$"},"description":"Your own id for the listing. It never changes and is never reused."}],"get":{"summary":"Read one listing","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Listing"},"requestId":{"type":"string"}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Create or update a listing","description":"Repeating the same call is safe: the externalId decides whether it is a new listing or an update.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingInput"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Listing"},"requestId":{"type":"string"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Listing"},"requestId":{"type":"string"}}}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"End a listing","parameters":[{"name":"reason","in":"query","schema":{"type":"string","enum":["sold","removed"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Listing"},"requestId":{"type":"string"}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/listings/bulk":{"post":{"summary":"Up to 100 changes in one call","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bulk"}}}},"responses":{"207":{"description":"One result per item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkResult"},"requestId":{"type":"string"}}}}}}}}}},"components":{"securitySchemes":{"sellerKey":{"type":"http","scheme":"bearer","description":"The key a seller creates in Yard Studio under eBay and channels, Only Partz, Listing tools."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},"Connection":{"type":"object","properties":{"seller":{"type":"string"},"application":{"type":"string"},"label":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"},"requestsPerMinute":{"type":"integer"}}},"Categories":{"type":"object","properties":{"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}}}}}}}}},"ListingInput":{"type":"object","additionalProperties":false,"required":["title","priceCents"],"properties":{"title":{"type":"string","maxLength":140},"priceCents":{"type":"integer","minimum":1},"quantity":{"type":"integer","minimum":0,"default":1},"status":{"type":"string","enum":["active","paused"],"default":"active","description":"An active listing needs at least one image."},"description":{"type":"string","maxLength":6000},"sku":{"type":"string","maxLength":60},"partNumbers":{"type":"array","maxItems":8,"items":{"type":"string"}},"categoryId":{"type":"string","description":"A part type id from /categories. Leave out and it is worked out from the title."},"grade":{"type":"string","enum":["","A","B","C"]},"images":{"type":"array","maxItems":24,"items":{"type":"string","format":"uri"},"description":"https links to the photos. We show them from your address; we don't copy them."},"fitment":{"type":"object","properties":{"fromYear":{"type":"integer"},"toYear":{"type":"integer"},"vehicles":{"type":"array","maxItems":800,"items":{"type":"object","required":["year","make","model"],"properties":{"year":{"type":"integer"},"make":{"type":"string"},"model":{"type":"string"},"trim":{"type":"string"},"engine":{"type":"string"}}}}}},"donorVin":{"type":"string","description":"The VIN of the car the part came from, if known. Kept private."}}},"Listing":{"type":"object","properties":{"externalId":{"type":"string"},"stockNumber":{"type":"string"},"title":{"type":"string"},"priceCents":{"type":"integer"},"quantity":{"type":"integer"},"status":{"type":"string","enum":["active","paused","ended"]},"onMarketplace":{"type":"boolean","description":"Whether buyers can see it right now."},"heldForReview":{"type":"boolean"},"categoryId":{"type":"string"},"sku":{"type":"string"},"partNumbers":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"type":"string"}},"url":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}},"ListingPage":{"type":"object","properties":{"listings":{"type":"array","items":{"$ref":"#/components/schemas/Listing"}},"nextCursor":{"type":["string","null"]}}},"Bulk":{"type":"object","required":["items"],"properties":{"items":{"type":"array","maxItems":100,"items":{"type":"object","required":["externalId"],"properties":{"externalId":{"type":"string"},"listing":{"$ref":"#/components/schemas/ListingInput"},"end":{"type":"string","enum":["sold","removed"]}}}}}},"BulkResult":{"type":"object","properties":{"failed":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string"},"ok":{"type":"boolean"},"status":{"type":"integer"},"listing":{"$ref":"#/components/schemas/Listing"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}