{"id":"code-work-sb-json-shipping-label","audience":"small-business","category":"coding","track":"coding","technique":"grounding","title":"Build a shipping label request with converted units","free":false,"task":"Build the JSON body for order CK-10431's label in exactly the doc's shape. The API wants grams and centimeters: the box weighs 2 lb (907 g) and measures 10 x 8 x 6 in (25.4 x 20.3 x 15.2 cm). The customer paid for express. The studio moved on Nov 1, so the from address is 88 Cedar Row, Unit 4, Bend, OR 97701, not the one saved in the doc example. One code block with only the JSON, then under 30 words outside the code.","materialLabel":"API doc excerpt and the order (attached to your prompt automatically)","material":"PARCELPATH API - Create label\nPOST /v1/labels\n{\n  \"to\": {\"name\": \"\", \"street\": \"\", \"city\": \"\", \"state\": \"\", \"zip\": \"\"},\n  \"from\": {\"name\": \"\", \"street\": \"\", \"city\": \"\", \"state\": \"\", \"zip\": \"\"},\n  \"parcel\": {\"weight_g\": 0, \"length_cm\": 0, \"width_cm\": 0, \"height_cm\": 0},\n  \"service\": \"ground | express\"\n}\nweight_g must be a whole number. Unknown fields return error 422.\n\nSaved example from our account:\nfrom: Copper Kettle Candle Co., 12 Juniper Ave, Bend, OR 97702\n\nORDER CK-10431\nShip to: Marisol Vega, 410 Larch Street, Eugene, OR 97401\nItems: Sampler box (gift wrapped)\nPaid shipping: Express ($14.00)\nGift note: \"Happy housewarming!\"\n\nNotes:\n- Gift notes are printed on the packing slip, not the label.\n- We usually ship ground.","rules":[{"type":"codeBlocks","count":1},{"type":"maxProseWords","max":30}],"mistakes":[{"title":"Not giving the units","why":"The AI copies 2 lb and 10 x 8 x 6 straight in, so the label is priced wrong or rejected.","fix":"Add: \"The API wants grams and cm: 907 g, 25.4 x 20.3 x 15.2.\"","checks":["r0"]},{"title":"Not mentioning the move","why":"The AI copies the old from address saved in the doc.","fix":"Add: \"From address is now 88 Cedar Row, Unit 4, Bend, OR 97701.\"","checks":["r1"]},{"title":"Not insisting on the doc's shape","why":"The AI adds the gift note or order number, which this API rejects.","fix":"Add: \"Exactly the doc's fields, nothing extra. Service express.\"","checks":["r2","r1"]},{"title":"Getting a menu of options","why":"The AI likes to offer two or three versions of the payload, so you're left to pick and test them yourself.","fix":"Add: \"Give one payload only, in one code block, no alternatives.\"","checks":["codeBlocks"]},{"title":"Getting a tutorial","why":"By default the AI explains every part of the code at length, which you then have to scroll past.","fix":"Add: \"After the code, one line under 8 words. Nothing else.\"","checks":["maxProseWords"]}],"promptHints":[{"label":"Gives the converted units","patterns":["907","grams?","\\bcm\\b|centimet"]},{"label":"Uses the new address","patterns":["cedar row","97701","moved"]},{"label":"Sticks to the doc's shape","patterns":["exact(ly)? (the )?(doc'?s )?shape","no extra fields","only (these|the) fields"]},{"label":"Sets the service","patterns":["express"]},{"label":"Asks for one answer only","patterns":["\\b(one|single|1)\\s+(payload|json|code block|block|version)","only one","no (alternatives|options|other versions)"]}],"hint":"The doc's units and saved address don't match your order. Tell the AI the converted numbers and the current address.","rubricLabels":["Uses converted units in parcel: weight_g 907 as a whole number, and length_cm 25.4, width_cm 20.3, height_cm 15.2 (not pounds or inches)","The from address is 88 Cedar Row, Unit 4, Bend, OR 97701 (not 12 Juniper Ave) and service is express","Matches the doc's shape exactly, with to, from, parcel and service only, and no extra fields such as gift_note, order_id or items"]}