{"openapi":"3.1.0","info":{"title":"Document-search API","description":"<h2>The document-search API can be used to fetch documents</h2>"},"servers":[{"url":"https://www.mybring.com/document-search","description":"Generated server url"}],"paths":{"/api/v1/search/{customerNumber}":{"get":{"tags":["api-controller"],"summary":"Search for documents","description":"Customer number must be set and at least one of the other search parameters. Max range for date interval search is 100 days","operationId":"search","parameters":[{"name":"customerNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"customsDeclarationNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"orderNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"shipmentNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"packageNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateArchivedFrom","in":"query","description":"Date format: yyyy-MM-dd","required":false,"schema":{"type":"string","format":"date"},"example":"2024-10-01"},{"name":"dateArchivedTo","in":"query","description":"Date format: yyyy-MM-dd","required":false,"schema":{"type":"string","format":"date"},"example":"2024-10-30"}],"responses":{"200":{"description":"Successfully provided document ids for the given search","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSearchResponse"},"examples":{"Successful":{"$ref":"#/components/examples/response"}}}}}},"security":[{"apiKey":[]},{"apiUid":[]}],"x-developer-site-metadata":{"order":"0"}}},"/api/v1/document/{customerNumber}/{id}":{"get":{"tags":["api-controller"],"summary":"Fetch document by id","description":"Fetch document by id for a given customer number.","operationId":"getDocument","parameters":[{"name":"customerNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Documents are either of type PDF or JSON. Allowed accept headers are application/json and application/pdf or just accept all.","example":"*/*"}],"responses":{"200":{"description":"Successfully returned document by id.","content":{"application/json":{},"application/pdf":{}}}},"security":[{"apiKey":[]},{"apiUid":[]}],"x-developer-site-metadata":{"order":"1"}}}},"components":{"schemas":{"ApiDocument":{"type":"object","properties":{"id":{"type":"string"},"customerNumber":{"type":"string"},"filename":{"type":"string"},"uploadedDate":{"type":"string","format":"date"},"docType":{"type":"string"},"shipmentNumber":{"type":"string"},"packageNumber":{"type":"string"},"consignmentNumber":{"type":"string"},"consignmentItemNumbers":{"type":"array","items":{"type":"string"}},"orderDate":{"type":"string","format":"date"},"customsNumber":{"type":"string"}},"required":["customerNumber","docType","filename","id","packageNumber","shipmentNumber","uploadedDate"]},"DocumentSearchResponse":{"type":"object","properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/ApiDocument"}}},"required":["documents"]}},"examples":{"response":{"value":{"documents":[{"id":"4321-8765-json-4321","customerNumber":"123456789","filename":"filename.json","uploadedDate":"2024-01-01","docType":"JSON","shipmentNumber":"123456789","packageNumber":"370123456789","orderDate":"2024-01-01"},{"id":"1234-5678-pdf-1234","customerNumber":"123456789","filename":"filename.pdf","uploadedDate":"2024-01-01","docType":"pdf","shipmentNumber":"123456789","packageNumber":"370123456789","orderDate":"2024-01-01"}]}}},"securitySchemes":{"apiKey":{"type":"apiKey","name":"X-MyBring-API-Key","in":"header","scheme":"basic"},"apiUid":{"type":"apiKey","name":"X-MyBring-API-Uid","in":"header","scheme":"basic"}}}}