{ "info": { "_postman_id": "dce37152-5d04-45c0-ae95-0513333cfe1e", "name": "Upsie Partner Network API", "description": "
Welcome to the Upsie Partner API! We are excited to offer our partners a secure and reliable way to access our repair network. Our API is designed to provide a simple and standardized interface for accessing the repair network while maintaining the highest level of security. It allows partner network members to easily request repairs, access details about all their repairs, and obtain other repair-related information.
\nTo ensure that all requests are authenticated and authorized, we use JSON Web Tokens (JWT) in our API. This feature ensures that only authorized users can access our network, and all requests remain secure and protected from malicious attacks. Additionally, our API adheres to industry-standard RESTful principles, making it easy to integrate with a wide range of platforms and applications.
\nWe are committed to providing our partners and customers with the best possible experience when using our API, and we welcome feedback and suggestions for improvement via email to dev@upsie.com.
\nThe production api is accessed at https://api.upsie.com and a sandbox environment is accessible at https://stage-api.upsie.com
\n\n\nbase production url: api.upsie.com
\n
base stage url: stage-api.upsie.com
The Upsie Partner Network API uses JWT Tokens to authenticate requests.
\nThe token should be passed in a token header with each api request.
Suggestions for safe use of JWT Tokens
\nPartner scoped API access tokens have 10 year expiration time.
\nAPI tokens can be generated and invalidated via the partner portal.
\nContact us if you need access to the partner portal or to be allowed API access.
\n", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json", "toc": [], "owner": "16328390", "collectionId": "dce37152-5d04-45c0-ae95-0513333cfe1e", "publishedId": "2s8ZDeUykK", "public": true, "customColor": { "top-bar": "FFFFFF", "right-sidebar": "303030", "highlight": "EF5B25" }, "publishDate": "2023-02-02T18:05:33.000Z" }, "item": [ { "name": "Partner endpoints (/partner)", "item": [ { "name": "Repairs (/repairs)", "item": [ { "name": "Create a Repair (all-in-one example)", "id": "2406f169-c5b5-43b5-a101-9a589bae6419", "protocolProfileBehavior": { "disableBodyPruning": true, "disabledSystemHeaders": {} }, "request": { "method": "POST", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"requestedTiming\": \"ASAP\", \n \"customer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"5554443333\",\n \"email\": \"jane.doe@example.com\"\n },\n \"authorizedLimit\": 12500,\n \"category\": \"Smartphones\",\n \"meta\": {\n \"policyNumber\": \"byUs483js\",\n \"model\": \"iPhone 12 mini\",\n \"serial\": \"abc12345\",\n \"imei\": \"123456789012345\",\n \"color\": \"black\",\n \"storage\": \"256gb\"\n },\n \"repairLocationDetails\": {\n \"address\": \"1 Green Ave, 55105\",\n \"radiusInMiles\": 50\n },\n \"items\": [\n {\n \"repairItemTemplateId\": 3\n },\n {\n \"description\": \"Front Screen Replacement\"\n },\n {\n \"description\": \"rear screen rebuffering\"\n }\n ]\n}\n", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/repairs", "urlObject": { "path": [ "partner", "repairs" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [ { "id": "29cc0a42-03b0-4a86-89fd-f4c6893190cc", "name": "Create a Repair (all-in-one example)", "originalRequest": { "method": "POST", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"requestedTiming\": \"ASAP\", \n \"customer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"5554443333\",\n \"email\": \"jane.doe@example.com\"\n },\n \"authorizedLimit\": 12500,\n \"category\": \"Smartphones\",\n \"meta\": {\n \"policyNumber\": \"byUs483js\",\n \"model\": \"iPhone 12 mini\",\n \"serial\": \"abc12345\",\n \"imei\": \"123456789012345\",\n \"color\": \"black\",\n \"storage\": \"256gb\"\n },\n \"repairLocationDetails\": {\n \"address\": \"1 Green Ave, 55105\",\n \"radiusInMiles\": 50\n },\n \"items\": [\n {\n \"repairItemTemplateId\": 3\n },\n {\n \"description\": \"Front Screen Replacement\"\n },\n {\n \"description\": \"rear screen rebuffering\"\n }\n ]\n}\n", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/repairs" }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Date", "value": "Tue, 18 Apr 2023 17:36:18 GMT" }, { "key": "Content-Type", "value": "application/json; charset=utf-8" }, { "key": "Transfer-Encoding", "value": "chunked" }, { "key": "Connection", "value": "keep-alive" }, { "key": "vary", "value": "Origin" }, { "key": "x-request-id", "value": "994b3e18-22dc-4104-9a71-710a2ff17656" }, { "key": "x-envoy-upstream-service-time", "value": "269" }, { "key": "CF-Cache-Status", "value": "DYNAMIC" }, { "key": "Server", "value": "cloudflare" }, { "key": "CF-RAY", "value": "7b9eab4e7e8b26bb-MSP" }, { "key": "Content-Encoding", "value": "gzip" } ], "cookie": [], "responseTime": null, "body": "{\n \"id\": 24,\n \"identifier\": \"U0017\",\n \"requestedAt\": \"2023-04-18T17:36:18.083Z\",\n \"repairStatus\": \"DRAFT\",\n \"assignmentStatus\": \"PENDING\",\n \"paymentStatus\": null,\n \"repairLocationDetails\": {\n \"address\": \"1 Green Ave, 55105\",\n \"radiusInMiles\": 50\n },\n \"comments\": null,\n \"meta\": {\n \"policyNumber\": \"byUs483js\",\n \"model\": \"iPhone 12 mini\",\n \"serial\": \"abc12345\",\n \"imei\": \"123456789012345\",\n \"color\": \"black\",\n \"storage\": \"256gb\"\n },\n \"categoryId\": 4,\n \"repairSourceId\": 1,\n \"authorizedLimit\": 12500,\n \"customerId\": 87141,\n \"allowEditingCustomer\": false,\n \"requestedTimingId\": 1,\n \"smartphoneId\": 276,\n \"activeAssignmentId\": null,\n \"warrantyId\": null,\n \"createdAt\": \"2023-04-18T17:36:18.083Z\",\n \"modifiedAt\": \"2023-04-18T17:36:18.083Z\",\n \"wasCancelled\": null,\n \"estCompleteDate\": null,\n \"intakeData\": null,\n \"completedAt\": null\n}" } ], "_postman_id": "2406f169-c5b5-43b5-a101-9a589bae6419" }, { "name": "Create a Repair (smartphone example)", "id": "9903bdbc-1897-43c7-801c-11f7f703dc09", "protocolProfileBehavior": { "disableBodyPruning": true, "disabledSystemHeaders": {} }, "request": { "method": "POST", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"requestedTiming\": \"ASAP\", \n \"customer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"5554443333\",\n \"email\": \"jane.doe@example.com\"\n },\n \"authorizedLimit\": 12500,\n \"category\": \"Smartphones\",\n \"meta\": {\n \"policyNumber\": \"rwJLHdNo\",\n \"model\": \"iPhone 12 mini\",\n \"serial\": \"abc12345\",\n \"imei\": \"123456789012345\",\n \"color\": \"black\",\n \"storage\": \"256gb\"\n },\n \"repairLocationDetails\": {\n \"address\": \"3 yellow Ave, 55105\",\n \"radiusInMiles\": 50\n }\n}\n", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/repairs?includes=customer", "description": "Many of the attributes in the repair object are nullable or assigned at creation or update. Below is a sample request body that satisfies the necessary requirements for repair creation.
\n", "urlObject": { "path": [ "partner", "repairs" ], "host": [ "{{api_host}}" ], "query": [ { "key": "includes", "value": "customer" } ], "variable": [] } }, "response": [], "_postman_id": "9903bdbc-1897-43c7-801c-11f7f703dc09" }, { "name": "Create a Repair (non-phone example)", "id": "eab4d94c-2430-4ba6-9666-3618a19ec426", "protocolProfileBehavior": { "disableBodyPruning": true, "disabledSystemHeaders": {} }, "request": { "method": "PUT", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"requestedTiming\": \"ASAP\", \n \"customer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"5554443333\",\n \"email\": \"jane.doe@example.com\"\n },\n \"authorizedLimit\": 12500,\n \"category\": \"Tablets\",\n \"meta\": {\n \"model\": \"iPad Air\",\n \"serial\": \"xyz98765\",\n \"color\": \"black\",\n \"storage\": \"512gb\"\n },\n \"repairLocationDetails\": {\n \"address\": \"370 Wabasha St N, 55102\",\n \"radiusInMiles\": 50\n }\n}\n", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/repairs", "description": "Many of the attributes in the repair object are nullable or assigned at creation or update. Below is a sample request body that satisfies the necessary requirements for repair creation.
\n", "urlObject": { "path": [ "partner", "repairs" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "eab4d94c-2430-4ba6-9666-3618a19ec426" }, { "name": "Create a Repair (minimal example)", "id": "5bbc8788-2f6f-4588-84f7-1f9f995e53ac", "protocolProfileBehavior": { "disableBodyPruning": true, "disabledSystemHeaders": {} }, "request": { "method": "POST", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"comments\": \"it broke\",\n \"repairStatus\": \"DRAFT\",\n \"requestedTimingId\": 1,\n \"requesterId\": 1,\n \"customerId\": 67518,\n \"warrantyId\": 71010,\n \"categoryId\": 1,\n \"meta\": {\n \"policyNumber\": \"byUs483js\",\n \"serial\": \"abc12345\",\n \"imei\": \"123456789012345\",\n \"color\": \"black\",\n \"storage\": \"256gb\"\n },\n \"repairLocationDetails\": {\n \"postalCode\": \"55105\",\n \"address\": \"1 Green Ave\",\n \"radiusInMiles\": 50\n }\n}", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/repairs", "description": "Many of the attributes in the repair object are nullable or assigned at creation or update. Below is a sample request body that satisfies the necessary requirements for repair creation.
\n", "urlObject": { "path": [ "partner", "repairs" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "5bbc8788-2f6f-4588-84f7-1f9f995e53ac" }, { "name": "Get All Repairs", "id": "273c7432-f0f3-46cf-a2eb-0c24f82757af", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/repairs", "description": "This endpoint returns all repairs regardless of any given status or attriibute. Filtering can be done client side or via query params. Documentation of the query param syntax used by the Upsie Repair Network API can be found below. Examples are included in the request Params tab.
Please note that these params serve as examples only. They will not return any results unless matching data has been created for this organization. In order to test the included query params, create data such that the query is satisfied.
\n", "urlObject": { "path": [ "partner", "repairs" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "273c7432-f0f3-46cf-a2eb-0c24f82757af" }, { "name": "Get One Repair", "id": "aae57742-3e9e-4fc5-aad4-6162c5c15975", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/repairs/5", "description": "This endpoint will return a singular repair object. Include the repair identifier that was returned on repair creation as a query param (as seen in the example request) or simply append to the url (i.e. partner/repairs/
This endpoint will return a singular repair object. Include the repair identifier that was returned on repair creation as a query param (as seen in the example request) or simply append to the url (i.e. partner/repairs/
The repair object is central to working with Upsie Repairs. Each repair contains one or more \"Repair Items\" (items property) which are the details of what aspects of the device are being requested to be repaired.
\nAttributes
\nid | number: Unique numeric value assigned by database engine.
\nidentifier | string or guid: Unique value assigned by platform.
\nrequestedAt | timestamp: Date the repair was requested.
\nrepairStatus | enum: Indicates state of repair.
\nassignmentStatus | enum: Indicates state of repair assignment.
\n[ASSIGNED, QUEUED, REQUESTED, ACCEPTED, REJECTED]
\npaymentStatus | enum: Indicates state of paymentr for a repair.
\n[DEPOSIT_COLLECTED, INVOICE_READY, PAID_IN_FULL, REFUNDED]
\nrepairLocationDetails | object: Address and coordinate data
\nlocation | Point: a GeoJson Point Object geocoded based on the repairLocationDetails address value.
\ncomments | string: Customer's description of damage / incident.
\nmeta | jsonb: metadata about the device and/or repair request
\nthe meta object is a flexible object that can accept any data you would like to attach to the repair. We have defined some field names to be used with specific meanings. Everything here is optional and you can extend this object as you wish beyond these.
\nauthorizedLimit | number: Max amount repair source is willing to pay for the repair. The value is expected as an integer of the number of cents in USD currency.
\ncategoryId | number: Id for the category of items that includes the device. (i.e. if the device needing repair is an iPhone and 1 is the id for the smartphone category then this value will be 1).
repairSourceId | number: Id of the organization from which the repair originates.
\ncustomerId | number: Id of the device owner.
\nrequestedTimeId | number: Id associated with a time frame the customer has request for repair turnaround.
\nsmartphoneId | number: Id for a device that is in the smartphone category.
\nactiveAssignmentId | number: Id of the assignment record associated with this repair. Once a repair status is ASSIGNED, it will associate to an assignment record.
wasCancelled | boolean: Flag to indicate if the repair has been cancelled or not.
\nrepairSource | object: All of the data associated with the organization
\n", "_postman_id": "041d26bd-dd47-4db7-87d0-7a71c725ec08" }, { "name": "Repair Items (/repairitems)", "item": [ { "name": "Get All Repair Items", "id": "07871b57-44eb-4538-9577-82eca31601dd", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/repairitems?where[repair_id]=22", "urlObject": { "path": [ "partner", "repairitems" ], "host": [ "{{api_host}}" ], "query": [ { "key": "where[repair_id]", "value": "22" } ], "variable": [] } }, "response": [], "_postman_id": "07871b57-44eb-4538-9577-82eca31601dd" }, { "name": "Create A Repair Item", "id": "3ad661cd-8c40-46e0-a268-96b85562dc75", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "POST", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"repairId\": 5,\n \"repairItemTemplateId\": 4\n}", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/repairitems", "urlObject": { "path": [ "partner", "repairitems" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "3ad661cd-8c40-46e0-a268-96b85562dc75" } ], "id": "e6180756-80b8-4d83-9dad-b48f61ffffd8", "description": "Repair Items are the main substance of the repair. They are related to repair item templates which serve as our \"quick pick\" lists of repairs in each category. If a specific template doesn't exist, an \"Other\" template is used which allows custom repair item descriptions.
\n", "_postman_id": "e6180756-80b8-4d83-9dad-b48f61ffffd8" }, { "name": "Repair Assignments (/repairassignments)", "item": [ { "name": "Get All Repair Assignments", "id": "ef7f3a65-171d-4d0a-9ce7-18cd5dc2827e", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/repairassignments", "urlObject": { "path": [ "partner", "repairassignments" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "ef7f3a65-171d-4d0a-9ce7-18cd5dc2827e" }, { "name": "Get a Repair Assignment", "id": "898db9e1-c50e-483c-81f2-f58db9fd48e6", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "url": "{{api_host}}/partner/repairassignments", "urlObject": { "path": [ "partner", "repairassignments" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "898db9e1-c50e-483c-81f2-f58db9fd48e6" } ], "id": "d1a256be-a248-4e1d-976a-b45c6413cb9a", "description": "Repair Assignments are accessable to our partners performing repairs only. Users and Organizations not setup to perform repairs cannot access this endpoint.
\n", "_postman_id": "d1a256be-a248-4e1d-976a-b45c6413cb9a" }, { "name": "Repair Item Templates", "item": [ { "name": "Get All Repair Item Templates", "id": "16e14b44-e48c-470e-9810-1cbc97959262", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/repairitemtemplates", "urlObject": { "path": [ "partner", "repairitemtemplates" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "16e14b44-e48c-470e-9810-1cbc97959262" }, { "name": "Get a Repair Item Template", "id": "9a50ce57-c29e-487b-9df4-b427d8b6bcbc", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/repairitemtemplates?where[category_id]=4", "urlObject": { "path": [ "partner", "repairitemtemplates" ], "host": [ "{{api_host}}" ], "query": [ { "key": "where[category_id]", "value": "4" } ], "variable": [] } }, "response": [], "_postman_id": "9a50ce57-c29e-487b-9df4-b427d8b6bcbc" } ], "id": "dea94bdc-3c46-4547-a8da-2d4cda9d71a8", "description": "Repair Item Templates are common repairs for a given repair category (i.e. Front Screen Replacement in the Smartphone category). For imformation on how to access repair categories, see the documentation on the Repair Categories endpoint below.
These templates can be added as Repair Items on a specific repair. Custom templates can be created for less common repairs.
\nid | number: Unique numeric value assigned by database engine.
\ncategory_id | number: Unique id of the related category (i.e. Smartphone).
description | string: The type of repair associated with the record (i.e. Front Screen Replacement).
parts | number: The cost of the parts to complete the described repair.
\nlabor | number: The cost of the labor to complete the described repair.
\ncost | number: The sum of parts and labor.
\nrequires_consultation | boolean: Indicates if consultation is required to proceed with the repair.
\nallow_multiple | boolean: Indicates if a repair item can occur multiple times on a singular repair invoice.
\nallow_custom_description | boolean: indicates if the description (mentioned above) maybe editted.
\n", "_postman_id": "dea94bdc-3c46-4547-a8da-2d4cda9d71a8" }, { "name": "Repair Notes", "item": [ { "name": "Get All Repair Notes", "id": "81cad86e-1225-496d-84a3-7c22412c5252", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/repairnotes?where[repairnotes__dot__repair_id]=13", "urlObject": { "path": [ "partner", "repairnotes" ], "host": [ "{{api_host}}" ], "query": [ { "key": "where[repairnotes__dot__repair_id]", "value": "13" }, { "disabled": true, "key": "", "value": "" } ], "variable": [] } }, "response": [], "_postman_id": "81cad86e-1225-496d-84a3-7c22412c5252" }, { "name": "Create Repair Note", "id": "adee4ec0-97e2-410d-8397-0e9f15993d15", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "POST", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"repairId\": 14,\n \"message\": \"last one\",\n \"alertCustomer\": false,\n \"alertRepairPartner\": false,\n \"alertRepairSource\": false,\n \"alertInteral\": false\n}", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/repairnotes", "urlObject": { "path": [ "partner", "repairnotes" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "adee4ec0-97e2-410d-8397-0e9f15993d15" } ], "id": "9c938919-6541-4cc4-87ed-0815a948b190", "description": "The Repair Notes endpoint returns the collection of communications associated with a repair. These notes might originate from Upsie, the repair source, customer or your organization.
\nid | number: Unique numeric value assigned by database engine.
\nrepair_id | number: Unique id of the repair related to the note.
\nauthor | string: Creator of the repair note record.
\nmessage | string: Contents of the repair note.
\ndata | jsonb: Intake data associated with the note.
\nis_internal | boolean: Indicates if this is an Upsie generated message.
\nalert_internal | boolean: Indicates if Upsie should be alerted when the note is generated.
\nalert_repair_partner | boolean: Indicates if the organization performing the repair should be alerted when the note is generated.
\nalert_repair_source | boolean: Indicates if the organization that requested the repair should be alerted when the note is generated.
\ncreated_at | timestamp: When a given repair note record was created.
\nmodified_at | timestamp: When a given repair note record was modified.
\n", "_postman_id": "9c938919-6541-4cc4-87ed-0815a948b190" }, { "name": "Repair Categories", "item": [ { "name": "Get All Repair Categories", "id": "17a65dc9-dc25-40d5-affb-2421b4f39c24", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/repaircategories", "urlObject": { "path": [ "partner", "repaircategories" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "17a65dc9-dc25-40d5-affb-2421b4f39c24" }, { "name": "Get a Repair Category", "id": "8de2cea0-0eb3-47af-a0dc-508f0e0ccc2c", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/repaircategories?where[id]=22", "urlObject": { "path": [ "partner", "repaircategories" ], "host": [ "{{api_host}}" ], "query": [ { "disabled": true, "key": "where[name]", "value": "Smartphones" }, { "key": "where[id]", "value": "22" } ], "variable": [] } }, "response": [], "_postman_id": "8de2cea0-0eb3-47af-a0dc-508f0e0ccc2c" } ], "id": "8039a600-b4cc-4ee8-b267-da188fb2751d", "description": "The Repair Categories endpoint will return one or all of the categories for which repairs can be created via this api. Repair Category ids are also used to retrieve the correct repair item templates.
\nid | number: Unique numeric value assigned by database engine.
\nparent_category_id | number: The id of the group to which a repair category belongs (i.e. Electronics)
name | string: The name of the category(i.e. Smartphone)
feature_order | number:
\nrepair_item_count | number: The count of repair items associated with a given category.
\n", "_postman_id": "8039a600-b4cc-4ee8-b267-da188fb2751d" } ], "id": "ea8731b2-793f-4b58-be87-59236661fcb8", "description": "Each endpoint in the partner namespace is prefixed with `/partner` and contains the following endpoints:
\nRepairs are managed with the `/partner/repairs` endpoint. They can be created and populated with details all-at-once or edited piece by piece.
\nTo send the repair request in a single payload, send a POST request to /partner/repairs with a payload formatted like this example:
{\n \"requestedTiming\": \"ASAP\", \n \"customer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"5554443333\",\n \"email\": \"jane.doe@example.com\"\n },\n \"authorizedLimit\": 12500,\n \"repairStatus\": \"SUBMITTED\",\n \"category\": \"Smartphones\",\n \"meta\": {\n \"policyNumber\": \"byUs483js\",\n \"model\": \"iPhone 12 mini\",\n \"serial\": \"abc12345\",\n \"imei\": \"123456789012345\",\n \"color\": \"black\",\n \"storage\": \"256gb\"\n },\n \"repairLocationDetails\": {\n \"address\": \"1 Green Ave, 55105\",\n \"radiusInMiles\": 50\n },\n \"items\": [\n {\n \"repairItemTemplateId\": 3\n },\n {\n \"description\": \"Front Screen Replacement\"\n },\n {\n \"description\": \"rear screen rebuffering\"\n }\n ]\n}\n\n\nIn this use case, we create an essentially empty repair and then update it with additional details and finally update the repairStatus to \"SUBMITTED\" to alert Upsie to begin routing the repair through the network.
POST to `/partner/repairs` with an empty object (`{ }`)in the request bodyPUT to partner/repairs/{{repair.id|repair.identifier}}with a body similar to this example{ \n \"requestedTiming\": \"ASAP\", \n \"customer\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"phoneNumber\": \"5554443333\",\n \"email\": \"jane.doe@example.com\"\n },\n \"authorizedLimit\": 12500,\n \"repairStatus\": \"SUBMITTED\",\n \"category\": \"Smartphones\",\n \"meta\": {\n \"policyNumber\": \"byUs483js\",\n \"model\": \"iPhone 12 mini\",\n \"serial\": \"abc12345\",\n \"imei\": \"123456789012345\",\n \"color\": \"black\",\n \"storage\": \"256gb\"\n },\n \"repairLocationDetails\": {\n \"address\": \"1 Green Ave, 55105\",\n \"radiusInMiles\": 50\n }\n}\n\n\n3. add repair item(s)
\na. send a POST to /partner/repairitems with a body similar to this example
{\n \"repairId\": 123,\n \"repairItemTemplateId\": 3\n}\n\n\nor
\n{\n \"repairId\": 123,\n \"description\": \"Front Screen Replacement\"\n}\n\n\n** the values for repairItemTemplateId and the description are found using the /partner/repairitemtempalates endpoint.
** repairs can contain many repair items, repeat this process as nesessary to populate your repair.
\n4. SUBMIT the repair by updating the repair status to \"SUBMITTED\"
\na. send a PUT to partner/repairs/{{repair.id|repair.identifier}}with a body similar to this example
{\n \"repairStatus\": \"SUBMITTED\"\n}\n\n\nAt this point the repair request has been submitted and will be processed by the platform. Core attributes of the repair are made readonly for the requestor at this stage. Repair notes can always be added at any time and can be used to request.
\n", "_postman_id": "ea8731b2-793f-4b58-be87-59236661fcb8" }, { "name": "Authorization", "item": [ { "name": "Partner User Login", "event": [ { "listen": "test", "script": { "id": "19862a68-0ac3-4a84-b911-e11e2b540916", "exec": [ "var jsonData = JSON.parse(responseBody);", "", "postman.setEnvironmentVariable(\"token\", jsonData.token);", "postman.setEnvironmentVariable(\"user_token\", jsonData.token);", "postman.setEnvironmentVariable(\"user_refresh_token\", jsonData.refresh);" ], "type": "text/javascript" } } ], "id": "686955d0-f931-4646-9ecc-cec621b1a9d7", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"username\": {{username}},\n \"password\": {{password}}\n}", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/auth/login", "urlObject": { "path": [ "partner", "auth", "login" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "686955d0-f931-4646-9ecc-cec621b1a9d7" }, { "name": "Generate Api Access Token", "event": [ { "listen": "test", "script": { "id": "d9ef90d2-447d-4a3d-9e50-f40b15683555", "exec": [ "var jsonData = JSON.parse(responseBody);", "", "postman.setEnvironmentVariable(\"token\", jsonData.token);", "postman.setEnvironmentVariable(\"repairApiRefreshToken\", jsonData.refresh);" ], "type": "text/javascript" } } ], "id": "98886b82-7884-4199-bfe2-971f6c5b67cb", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "POST", "header": [ { "key": "token", "value": "{{token}}", "type": "text" } ], "url": "{{api_host}}/partner/auth/apiaccess", "description": "This endpoint will grant access to the tools available on the Upsie Partner Network API. In order to generate an API token you will need the token (in the request headers as token) from the initial login and an account that is properly associated with a repair source (your organization). This association is made at account creation or can be requested later for additional accounts.
This endpoint is used to generate a new pair of tokens (access and refresh) upon access token expiration. The Upsie Partner Network API will expect the most recent repair api refresh token in the headers as token.
This endpoint will grant access to the tools available on the Upsie Partner Network API. In order to generate an API token you will need the token (in the request headers as token) from the initial login and an account that is properly associated with a repair source (your organization). This association is made at account creation or can be requested later for additional accounts.
The Upsie Partner Network API uses JWT Tokens Keys to authenticate requests. These API keys carry many privileges, so be sure to keep them secure. Do not share API keys in publicly accessible areas such as GitHub, client-side code, etc. Additionally, these tokens include an encoded expiration date which can be checked at any point. Access tokens have 30 day expiration time while refresh tokens have a 60 day expiration time.
\nThis portion of the documentation assumes access to the Upsie Partner Portal and the related permissions. Access to the initial token generation tool therein is not required but makes set up easier.
\n", "_postman_id": "93bf6362-463e-4a0c-84db-6ba38e9ff37b" }, { "name": "Webhooks", "item": [ { "name": "get all webhooks", "id": "f0072a53-1bb8-4744-8c3a-5f1c3033c3f1", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" }, { "key": "Content-Type", "value": "", "type": "text" } ], "url": "{{api_host}}/partner/partnerorganizationwebhooks/", "description": "Get all webhooks
\n", "urlObject": { "path": [ "partner", "partnerorganizationwebhooks", "" ], "host": [ "{{api_host}}" ], "query": [], "variable": [] } }, "response": [], "_postman_id": "f0072a53-1bb8-4744-8c3a-5f1c3033c3f1" }, { "name": "get a webhook", "id": "c842c6fa-66eb-45c6-98c9-1b6d4ba347c7", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "token", "value": "{{token}}", "type": "text" }, { "key": "Content-Type", "value": "", "type": "text" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/partnerorganizationwebhooks/:id", "description": "Get a singular webhook by id
\n", "urlObject": { "path": [ "partner", "partnerorganizationwebhooks", ":id" ], "host": [ "{{api_host}}" ], "query": [], "variable": [ { "type": "any", "value": null, "key": "id" } ] } }, "response": [], "_postman_id": "c842c6fa-66eb-45c6-98c9-1b6d4ba347c7" }, { "name": "create webhook", "id": "dd381980-25e3-4f46-aa09-7e138ef49352", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "POST", "header": [ { "key": "token", "value": "{{token}}", "type": "text" }, { "key": "Content-Type", "value": "", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"url\": \"https://www.url.com/webhooks\",\n \"meta\": {\n \"events\": [\"repair_status_updated\"]\n },\n \"description\": \"descripition\"\n}", "options": { "raw": { "language": "json" } } }, "url": "{{api_host}}/partner/partnerorganizationwebhooks", "description": "Create a webhook.
\nurl | string: The url that webhook data should be sent to.
\nmeta | jsonb: The meta object is a flexible object that can accept any data you would like to attach to the webhook. Some feilds are required.
\nisActive | boolean: A flag to activate or deactivate a webhook.
\ndescription | string (optional): A short explantion of the webhook.
\nThis endpoint will return the updated webhook. The properties that may be updated are explained in detail in the POST create a webhook documentation above. Those properties are: url, isActive, meta and description.
The webhooks DELETE endpoint will remove a webhook record from the database. It is a hard delete, no record of url, meta, etc will remain after making this request.
Listen for events and forward them to your application. These endpoints are used in conjunction with Generate Api Access Token mentioned in the authorization section to monitor events.