AMCS Group CustomerReportBlob API

The CustomerReportBlob API from AMCS Group — 1 operation(s) for customerreportblob.

OpenAPI Specification

amcs-group-customerreportblob-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Core AccessGroup CustomerReportBlob API
  version: core
tags:
- name: CustomerReportBlob
paths:
  /blobs/customerReportBlobs:
    post:
      tags:
      - CustomerReportBlob
      summary: Create or update
      description: "| --------------------------------- | ----------------------------------------------------------------------------- | -------- |\r\n| DocumentDescription| The description associated to the customer report.| Yes |\r\n| DocumentName| The document name associated to the customer report.| Yes |\r\n| IsForAllSites| Whether the customer report is for all sites of related customer.| No |\r\n| MediaContentBase64| The file converted to base 64.| Yes |\r\n| RelatedCustomerGuid| The related customer guid associated to the customer report.| Yes |\r\n| RelatedSites| The list of related customer site.| No |\r\n| RelatedSites[0].Guid| The guid associated to the customer report site.| No |\r\n| RelatedSites[0].RelatedSiteGuid| The related customer siteguid associated to the customer report site.| No |\r\n\r\n**Extra validations**\r\n\r\n| Condition | Error message |\r\n| --------- | ------------- |\r\n| DocumentDescription is Null or not provided | The mandatory property DocumentDescription has a null value. The request could not be processed. Supply a value for the DocumentDescription property of the submitted resource. |\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 510 characters | CustomerReport has the property DocumentName with value of {DocumentName} that is not supported. DocumentName should be at least 1 character and at most 506 characters, excluding the extension |\r\n| DocumentName does not have any of pdf/png/jpg/gif extension  | CustomerReport has the property DocumentName with value of {DocumentName} that is not supported. DocumentName should have any of pdf/png/jpg/gif extension |\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 CustomerReport because MediaContentBase64 has Invalid length for a Base-64 char array or string |\r\n| RelatedCustomerGuid is Null or not provided | The mandatory property RelatedCustomerGuid has a null value. The request could not be processed. Supply a value for the RelatedCustomerGuid property of the submitted resource.  |\r\n| RelatedSites is empty and IsForAllSites is false | Failed to save/update CustomerReport because if IsForAllSites = false, at least one site must be present in RelatedSites array. |\r\n| RelatedSites has all sites and IsForAllSites is true | Failed to save/update CustomerReport because if IsForAllSites = true, at least one site must not be present in RelatedSites array. |\r\n| RelatedSites has duplicate RelatedSiteGuid | Failed to save/update CustomerReport because duplicate RelatedSiteGuid listed in the RelatedSites array. |\r\n| RelatedSiteGuid is not related RelatedCustomerGuid | Failed to save. CustomerSite with RelatedSiteGuid of {RelatedSiteGuid} does not belong to Customer |\r\n| RelatedSites.Guid is not null | Failed to save/update CustomerReport because Guid is not permitted on creation. |\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: CustomerReportBlob_Create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiIntegratorCustomerReportResource'
        required: true
        x-bodyName: null
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResourceId'
components:
  schemas:
    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
    ApiIntegratorCustomerReportRelatedSiteResource:
      type: object
      properties:
        Guid:
          type: string
          format: uuid
          example: 00000000-0000-0000-0000-000000000000
        RelatedSiteGuid:
          type: string
          format: uuid
          example: 00000000-0000-0000-0000-000000000000
    ApiIntegratorCustomerReportResource:
      type: object
      properties:
        DocumentDescription:
          type: string
        DocumentName:
          type: string
        IsForAllSites:
          type: boolean
        MediaContentBase64:
          type: string
        RelatedSites:
          type: array
          items:
            $ref: '#/components/schemas/ApiIntegratorCustomerReportRelatedSiteResource'
        RelatedCustomerGuid:
          type: string
          format: uuid
          example: 00000000-0000-0000-0000-000000000000
    ApiResourceStatus:
      type: object
      properties:
        id:
          type: integer
          format: int32
        isSuccess:
          type: boolean