{"openapi":"3.1.0","info":{"title":"Northlight Flowers (stale skill test) (PAP Sandbox)","version":"2","description":"Product search, delivery dates, the customer's orders, and changes to a delivery. A reference store for personal agents: nothing is charged and nothing ships. Every request carries the Poppy-Session header (Personal Agent Protocol draft 0.3, 5.2); account operations also an access token, Bearer, or DPoP with a proof when the token is DPoP-bound (4.5). Operations that change an order or booking answer 403 approval_required with the operation until the same request comes back with the User's approval in Poppy-Approval (operations extension v2)."},"servers":[{"url":"https://flowers-skills-stale.papsandbox.com"}],"paths":{"/poppy/products":{"get":{"operationId":"search","summary":"Search the catalogue by name, category or tag. Prices in cents.","security":[{"poppySession":[]}],"x-poppy-scope":null,"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Words to search for; empty lists everything."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_session or session_ended (5.3, 5.5), or invalid_request, in a JSON body."}}}},"/poppy/delivery-dates":{"get":{"operationId":"delivery_dates","summary":"The delivery dates open for the next week or two.","security":[{"poppySession":[]}],"x-poppy-scope":null,"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_session or session_ended (5.3, 5.5), or invalid_request, in a JSON body."}}}},"/poppy/orders":{"get":{"operationId":"my_orders","summary":"The signed-in customer's open orders.","security":[{"poppySession":[],"oauth":["orders:read"]}],"x-poppy-scope":"orders:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_session or session_ended (5.3, 5.5), or invalid_request, in a JSON body."},"401":{"description":"No access token (a challenge naming the scope), or invalid_token, in WWW-Authenticate."},"403":{"description":"insufficient_scope in WWW-Authenticate."}}}},"/poppy/orders/{order_id}/changes":{"post":{"operationId":"change_order","summary":"Propose a change to an order: move the delivery, add, swap or remove items. Returns HTTP 403 approval_required with the operation (operations extension v2); send the same request again with the User's approval in Poppy-Approval to make the change.","security":[{"poppySession":[],"oauth":["orders:write"]}],"x-poppy-scope":"orders:write","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"delivery_date":{"type":"string","description":"Move the delivery: one of the values from delivery_dates."},"add":{"type":"array","items":{"type":"object","required":["product_id"],"properties":{"product_id":{"type":"string"},"variant_id":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":10}}}},"replace":{"type":"array","description":"Swap a line for another product, keeping its quantity.","items":{"type":"object","required":["line_id","product_id"],"properties":{"line_id":{"type":"string"},"product_id":{"type":"string"},"variant_id":{"type":"string"}}}},"remove":{"type":"array","items":{"type":"string"},"description":"line_id values to remove."},"card_message":{"type":"string","maxLength":200,"description":"A handwritten card with the flowers. Adds the Gift Card Envelope ($3.00) if the order has none."}}}}}},"responses":{"200":{"description":"Done: the change the User approved, made once.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_session or session_ended (5.3, 5.5), or invalid_request, in a JSON body."},"401":{"description":"No access token (a challenge naming the scope), or invalid_token, in WWW-Authenticate."},"403":{"description":"insufficient_scope in WWW-Authenticate; or approval_required with the operation in a JSON body (operations extension v2): send the same request again with Poppy-Approval after the User approves.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","const":"approval_required"},"operation":{"$ref":"#/components/schemas/Operation"}}}}}},"503":{"description":"The approved operation is being performed: send the same request with the same approval again after Retry-After."}}}}},"components":{"securitySchemes":{"poppySession":{"type":"apiKey","in":"header","name":"Poppy-Session","description":"The Session JWT for this request (Personal Agent Protocol 5.2)."},"oauth":{"type":"oauth2","description":"The store's OAuth access tokens (Personal Agent Protocol section 4). Device and Mediated Sign-In grant the same scopes.","flows":{"authorizationCode":{"authorizationUrl":"https://flowers-skills-stale.papsandbox.com/oauth/authorize","tokenUrl":"https://flowers-skills-stale.papsandbox.com/oauth/token","refreshUrl":"https://flowers-skills-stale.papsandbox.com/oauth/token","scopes":{"orders:read":"See your orders and their deliveries: what you ordered, the delivery date and the card message. Read only.","orders:write":"Change an order: move its delivery date, or add, swap or remove items and the card. A change can add items and charge the difference, which can't be undone. You still approve each change. Doesn't include reading your orders."}}}}},"schemas":{"Operation":{"type":"object","required":["operation_id","revision","summary","expires_at"],"properties":{"operation_id":{"type":"string"},"revision":{"type":"string"},"summary":{"type":"string"},"terms":{"type":"object"},"expires_at":{"type":"string","format":"date-time"}}}}}}