openapi: 3.0.1 info: title: Core AccessGroup CustomerSiteHealthAndSafetyBlob API version: core tags: - name: CustomerSiteHealthAndSafetyBlob paths: /blobs/customerSiteHealthAndSafetyBlobs: post: tags: - CustomerSiteHealthAndSafetyBlob summary: Create or update description: "| ------------------------------------- | ----------------------------------------------------------------------------- | -------- |\r\n| Guid| The GUID associated to the Customer Site Health and Safety blob| No |\r\n| MediaContentBase64| The Image/PDF converted to base 64| Yes |\r\n| DocumentName| The Document Name| Yes |\r\n| DocumentReference| The Document Reference| Yes |\r\n| DocumentDescription| The Document Description| No |\r\n| RelatedCustomerSiteGuid| The Related Customer Site Guid| Yes |\r\n| HealthAndSafetyDocumentTypeListItem | The GUID and description of the health and safety document type| Yes |\r\n| ValidFrom| The valid from date| Yes |\r\n| ValidUntil| The valid until date| No |\r\n| IsHighRisk| Whether the document contains high risk items| No |\r\n| IsSentToVehicle| Whether the document is sent to vehicle| No |\r\n\r\n**Extra validations**\r\n\r\n| Condition | Error message |\r\n| --------- | ------------- |\r\n| DocumentName is Null or not provided | The mandatory property DocumentName has a null value. The request could not be processed. Supply a value for the DocumentName property of the submitted resource. |\r\n| DocumentName has less than 5 characters or more than 100 characters | CustomerSiteHealthAndSafetyForm has the property DocumentName with value of {DocumentName} that is not supported. DocumentName should be at least 1 character and at most 100 characters, excluding the extension |\r\n| DocumentName does not have any of pdf/png/jpg/gif extension | CustomerSiteHealthAndSafetyForm has the property DocumentName with value of {DocumentName} that is not supported. DocumentName should have any of pdf/png/jpg/gif extension |\r\n| DocumentReference is Null or not provided | The mandatory property DocumentReference has a null value. The request could not be processed. Supply a value for the DocumentReference property of the submitted resource. |\r\n| RelatedCustomerSiteGuid is Null or not provided | The mandatory property RelatedCustomerSiteGuid has a null value. The request could not be processed. Supply a value for the RelatedCustomerSiteGuid property of the submitted resource. |\r\n| Invalid RelatedCustomerSiteGuid | Failed to retrieve Customer Site with RelatedCustomerSiteGuid of {Guid} |\r\n| HealthAndSafetyDocumentTypeListItem.Guid is Null or not provided | The mandatory property HealthAndSafetyDocumentTypeListItem.Guid has a null value. The request could not be processed. Supply a value for the HealthAndSafetyDocumentTypeListItem.Guid property of the submitted resource. \r\n| Invalid HealthAndSafetyDocumentTypeListItem.Guid | Failed to retrieve HealthAndSafetyDocumentType with HealthAndSafetyDocumentTypeListItem.Guid of {Guid} |\r\n| MediaContentBase64 is Null or not provided | The mandatory property MediaContentBase64 has a null value. The request could not be processed. Supply a value for the MediaContentBase64 property of the submitted resource. |\r\n| MediaContentBase64 is not a valid base64 string | Failed to save/update CustomerSiteHealthAndSafetyForm because ImageContentHash has Invalid length for a Base-64 char array or string |\r\n\r\n## Information\r\n| Information |\r\n| ----------- |\r\n| Currently we are only validating for a valid base64 string, we are not validating the string against the file extension |" operationId: CustomerSiteHealthAndSafetyBlob_Create requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiIntegratorHealthAndSafetyBlobHashesResource' required: true x-bodyName: null responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ApiResourceId' components: schemas: ApiIntegratorListItemResource: type: object properties: Description: type: string Guid: type: string format: uuid example: 00000000-0000-0000-0000-000000000000 ApiResourceId: type: object properties: resource: type: string format: uuid errors: $ref: '#/components/schemas/ApiResourceErrors' status: $ref: '#/components/schemas/ApiResourceStatus' ApiResourceErrors: type: object properties: errors: type: string ApiIntegratorHealthAndSafetyBlobHashesResource: type: object properties: MediaContentBase64: type: string DocumentName: type: string DocumentReference: type: string DocumentDescription: type: string HealthAndSafetyDocumentTypeListItem: $ref: '#/components/schemas/ApiIntegratorListItemResource' RelatedCustomerSiteGuid: type: string format: uuid example: 00000000-0000-0000-0000-000000000000 ValidFrom: type: string format: localDate example: '2000-01-01' ValidUntil: type: string format: localDate example: '2000-01-01' IsHighRisk: type: boolean IsSentToVehicle: type: boolean ApiResourceStatus: type: object properties: id: type: integer format: int32 isSuccess: type: boolean