{
 "openapi": "3.0.4",
 "info": {
  "title": "Delivery Integration Indoor Service",
  "description": "Get a produced card to the cardholder and track it there",
  "contact": {
   "name": "DgPays",
   "url": "https://www.dgpays.com"
  },
  "license": {
   "name": "License",
   "url": "https://www.dgpays.com"
  },
  "version": "v8.3.5.6"
 },
 "servers": [
  {
   "url": "https://devcard.sim-ant.com/SandBox/IntegrationDelivery",
   "description": "Sandbox — safe to call; nothing settles."
  }
 ],
 "paths": {
  "/delivery-integration-indoor-service/api/createDeliveryFile": {
   "post": {
    "tags": [
     "Card delivery and courier tracking"
    ],
    "summary": "Service that generates the delivery file for use in distribution processes",
    "description": "Service that generates the delivery file for use in distribution processes.",
    "operationId": "createDeliveryFile",
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CreateDeliveryFileResponse"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/ActionNotFound"
     },
     "400": {
      "$ref": "#/components/responses/BusinessFailure"
     },
     "500": {
      "$ref": "#/components/responses/TechnicalFailure"
     }
    }
   }
  },
  "/delivery-integration-indoor-service/api/getCourierInformation": {
   "post": {
    "tags": [
     "Card delivery and courier tracking"
    ],
    "description": "Service that retrieves the card’s courier delivery information using the barcode number.",
    "operationId": "getCourierInformation",
    "requestBody": {
     "description": "Courier Information Integration Request",
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CourierInformationIntegrationRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CourierInformationIntegrationResponse"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/ActionNotFound"
     },
     "400": {
      "$ref": "#/components/responses/BusinessFailure"
     },
     "500": {
      "$ref": "#/components/responses/TechnicalFailure"
     }
    }
   }
  },
  "/delivery-integration-indoor-service/api/updateAddressInformation": {
   "post": {
    "tags": [
     "Card delivery and courier tracking"
    ],
    "description": "Service that allows updating the customer’s delivery address.",
    "operationId": "updateAddressInformation",
    "requestBody": {
     "description": "Update Address Information Integration Request",
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/UpdateAddressInformationIntegrationRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/UpdateAddressInformationIntegrationResponse"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/ActionNotFound"
     },
     "400": {
      "$ref": "#/components/responses/BusinessFailure"
     },
     "500": {
      "$ref": "#/components/responses/TechnicalFailure"
     }
    }
   }
  },
  "/delivery-integration-indoor-service/api/updateMovementsWithBarcodeNumber": {
   "post": {
    "tags": [
     "Card delivery and courier tracking"
    ],
    "description": "Service that updates delivery movements and status information based on the barcode number of the courier shipment.",
    "operationId": "updateMovementsWithBarcodeNumber",
    "requestBody": {
     "description": "Update Movements With Barcode Number Integration Request",
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/UpdateMovementsWithBarcodeNumberIntegrationRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/UpdateMovementsWithBarcodeNumberIntegrationResponse"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/ActionNotFound"
     },
     "400": {
      "$ref": "#/components/responses/BusinessFailure"
     },
     "500": {
      "$ref": "#/components/responses/TechnicalFailure"
     }
    }
   }
  },
  "/delivery-integration-indoor-service/api/getBasicCourierInformation": {
   "post": {
    "tags": [
     "Card delivery and courier tracking"
    ],
    "description": "Service that retrieves basic courier stage information based on the provided Shadow Card Number.",
    "operationId": "getBasicCourierInformation",
    "requestBody": {
     "description": "Get Basic Courier Information Request",
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GetBasicCourierInformationRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GetBasicCourierInformationResponse"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/ActionNotFound"
     },
     "400": {
      "$ref": "#/components/responses/BusinessFailure"
     },
     "500": {
      "$ref": "#/components/responses/TechnicalFailure"
     }
    }
   }
  },
  "/delivery-integration-indoor-service/api/getCourierInformationIbmb": {
   "post": {
    "tags": [
     "Card delivery and courier tracking"
    ],
    "description": "Service that returns detailed IBMB system information of the courier company used for card delivery.",
    "operationId": "getCourierInformationIbmb",
    "requestBody": {
     "description": "Get Courier Information Ibmb Request",
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GetCourierInformationIbmbRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GetCourierInformationIbmbResponse"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/ActionNotFound"
     },
     "400": {
      "$ref": "#/components/responses/BusinessFailure"
     },
     "500": {
      "$ref": "#/components/responses/TechnicalFailure"
     }
    }
   }
  },
  "/delivery-integration-indoor-service/api/getCourierInformationByMainCustomer": {
   "post": {
    "tags": [
     "Card delivery and courier tracking"
    ],
    "description": "Service that returns detailed IBMB system information of the courier company used for card delivery, based on the provided customer number.",
    "operationId": "getCourierInformationByMainCustomer",
    "requestBody": {
     "description": "Get Courier Information By Main Customer Request",
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GetCourierInformationByMainCustomerRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GetCourierInformationByMainCustomerResponse"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/ActionNotFound"
     },
     "400": {
      "$ref": "#/components/responses/BusinessFailure"
     },
     "500": {
      "$ref": "#/components/responses/TechnicalFailure"
     }
    }
   }
  },
  "/delivery-integration-indoor-service/api/healthCheck": {
   "post": {
    "tags": [
     "Platform operations"
    ],
    "description": "It is a method that checks whether the service is operational.",
    "operationId": "healthCheck",
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HealthCheckResponse"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/ActionNotFound"
     },
     "400": {
      "$ref": "#/components/responses/BusinessFailure"
     },
     "500": {
      "$ref": "#/components/responses/TechnicalFailure"
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "BasicCourierInformation": {
    "type": "object",
    "properties": {
     "maskedCardNumber": {
      "type": "string",
      "description": "Masked Card Number",
      "nullable": true
     },
     "shadowCardNumber": {
      "type": "string",
      "description": "Shadow Card Number",
      "nullable": true
     },
     "barcode": {
      "type": "string",
      "description": "Barcode",
      "nullable": true
     },
     "courierCompanyCode": {
      "type": "string",
      "description": "Courier Company Code",
      "nullable": true
     },
     "operationDateStr": {
      "type": "string",
      "description": "Operation Date Str",
      "nullable": true
     },
     "operationTimeStr": {
      "type": "string",
      "description": "Operation Time Str",
      "nullable": true
     },
     "courierStateDescription": {
      "type": "string",
      "description": "Courier State Description",
      "nullable": true
     },
     "courierState": {
      "type": "string",
      "description": "Courier State",
      "nullable": true
     }
    }
   },
   "CardCourierInformation": {
    "required": [
     "customerNumber",
     "mainCustomerNumber",
     "digitalCardFlag",
     "cardMasterRecordId"
    ],
    "type": "object",
    "properties": {
     "barcode": {
      "type": "string",
      "description": "Barcode",
      "nullable": true
     },
     "shadowCardNumber": {
      "type": "string",
      "description": "Shadow Card Number",
      "nullable": true
     },
     "maskedCardNumber": {
      "type": "string",
      "description": "Masked Card Number",
      "nullable": true
     },
     "customerNumber": {
      "type": "integer",
      "description": "Customer Number",
      "format": "int64"
     },
     "mainCustomerNumber": {
      "type": "integer",
      "description": "Main Customer Number",
      "format": "int64"
     },
     "productTypeCode": {
      "type": "string",
      "description": "Product Type Code",
      "nullable": true
     },
     "productNumber": {
      "type": "string",
      "description": "Product Number",
      "nullable": true
     },
     "productName": {
      "type": "string",
      "description": "Product Name",
      "nullable": true
     },
     "statusCode": {
      "type": "string",
      "description": "Status Code",
      "nullable": true
     },
     "statusDescription": {
      "type": "string",
      "description": "Status Description",
      "nullable": true
     },
     "digitalCardFlag": {
      "type": "boolean",
      "description": "Digital Card Flag"
     },
     "cardRefNumber": {
      "type": "string",
      "description": "Card Ref Number",
      "nullable": true
     },
     "mainCardRefNumber": {
      "type": "string",
      "description": "Main Card Ref Number",
      "nullable": true
     },
     "cardMasterRecordId": {
      "type": "integer",
      "description": "Card Master Record Id",
      "format": "int64"
     }
    }
   },
   "CourierInformation": {
    "required": [
     "operationDateTime"
    ],
    "type": "object",
    "properties": {
     "barcode": {
      "type": "string",
      "description": "Barcode",
      "nullable": true
     },
     "operationDateStr": {
      "type": "string",
      "description": "Operation Date Str",
      "nullable": true
     },
     "operationTimeStr": {
      "type": "string",
      "description": "Operation Time Str",
      "nullable": true
     },
     "operationStatus": {
      "type": "string",
      "description": "Operation Status",
      "nullable": true
     },
     "operationDescription": {
      "type": "string",
      "description": "Operation Description",
      "nullable": true
     },
     "operationDateTime": {
      "type": "string",
      "description": "Operation Date Time",
      "format": "date-time"
     },
     "callOnNumber": {
      "type": "string",
      "description": "Call On Number",
      "nullable": true
     }
    }
   },
   "CourierInformationIntegrationRequest": {
    "type": "object",
    "properties": {
     "barcode": {
      "type": "string",
      "description": "Barcode",
      "nullable": true
     }
    }
   },
   "CourierInformationIntegrationResponse": {
    "type": "object",
    "properties": {
     "informationList": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/CourierInformation"
      },
      "description": "Information List",
      "nullable": true
     },
     "responseCode": {
      "type": "string",
      "description": "Response Code",
      "nullable": true
     },
     "responseDescription": {
      "type": "string",
      "description": "Response Description",
      "nullable": true
     },
     "exceptionDetail": {
      "type": "string",
      "description": "Exception Detail",
      "nullable": true
     }
    }
   },
   "CreateDeliveryFileResponse": {
    "required": [
     "responseCode"
    ],
    "type": "object",
    "properties": {
     "responseCode": {
      "type": "integer",
      "description": "Response Code",
      "format": "int32"
     },
     "responseDescription": {
      "type": "string",
      "description": "Response Description",
      "nullable": true
     },
     "exceptionDetail": {
      "type": "string",
      "description": "Exception Detail",
      "nullable": true
     }
    }
   },
   "Error": {
    "type": "object",
    "properties": {
     "transactionId": {
      "type": "string",
      "description": "Transaction Id",
      "nullable": true
     },
     "errorCode": {
      "type": "string",
      "description": "Error Code",
      "nullable": true
     },
     "description": {
      "type": "string",
      "description": "Description",
      "nullable": true
     },
     "message": {
      "type": "string",
      "description": "Message",
      "nullable": true
     },
     "messageFormat": {
      "type": "string",
      "description": "Message Format",
      "nullable": true
     },
     "arguments": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Arguments",
      "nullable": true
     },
     "propertyName": {
      "type": "string",
      "description": "Property Name",
      "nullable": true
     },
     "detail": {
      "type": "string",
      "description": "Detail",
      "nullable": true
     },
     "items": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Error"
      },
      "description": "Items",
      "nullable": true
     },
     "isTechnicalError": {
      "type": "boolean",
      "description": "Is Technical Error",
      "nullable": true
     },
     "exceptionType": {
      "type": "string",
      "description": "Exception Type",
      "nullable": true
     }
    }
   },
   "GetBasicCourierInformationRequest": {
    "type": "object",
    "properties": {
     "shadowCardNumber": {
      "type": "string",
      "description": "Shadow Card Number",
      "nullable": true
     }
    }
   },
   "GetBasicCourierInformationResponse": {
    "type": "object",
    "properties": {
     "informationList": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/BasicCourierInformation"
      },
      "description": "Information List",
      "nullable": true
     },
     "latestBarcodeStateInformation": {
      "allOf": [
       {
        "$ref": "#/components/schemas/LatestBarcodeStateInformation"
       }
      ],
      "description": "Latest Barcode State Information",
      "nullable": true
     },
     "responseCode": {
      "type": "string",
      "description": "Response Code",
      "nullable": true
     },
     "responseDescription": {
      "type": "string",
      "description": "Response Description",
      "nullable": true
     }
    }
   },
   "GetCourierInformationByMainCustomerRequest": {
    "type": "object",
    "properties": {
     "channel": {
      "type": "string",
      "description": "Channel",
      "nullable": true
     },
     "mainCustomerNumber": {
      "type": "integer",
      "description": "Main Customer Number",
      "format": "int64",
      "nullable": true
     },
     "productType": {
      "type": "string",
      "description": "Product Type",
      "nullable": true
     },
     "statusCode": {
      "type": "string",
      "description": "Status Code",
      "nullable": true
     }
    }
   },
   "GetCourierInformationByMainCustomerResponse": {
    "type": "object",
    "properties": {
     "cardList": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/CardCourierInformation"
      },
      "description": "Card List",
      "nullable": true
     }
    }
   },
   "GetCourierInformationIbmbRequest": {
    "type": "object",
    "properties": {
     "customerNumber": {
      "type": "string",
      "description": "Customer Number",
      "nullable": true
     },
     "barcode": {
      "type": "string",
      "description": "Barcode",
      "nullable": true
     },
     "productSegment": {
      "type": "string",
      "description": "Product Segment",
      "nullable": true
     }
    }
   },
   "GetCourierInformationIbmbResponse": {
    "required": [
     "isHaveAnyDebitCard",
     "isHaveAnyCreditCard"
    ],
    "type": "object",
    "properties": {
     "listOfDebitCard": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/IbmbCourierInformation"
      },
      "description": "List Of Debit Card",
      "nullable": true
     },
     "listOfCreditCard": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/IbmbCourierInformation"
      },
      "description": "List Of Credit Card",
      "nullable": true
     },
     "isHaveAnyDebitCard": {
      "type": "boolean",
      "description": "Is Have Any Debit Card"
     },
     "isHaveAnyCreditCard": {
      "type": "boolean",
      "description": "Is Have Any Credit Card"
     }
    }
   },
   "HealthCheckResponse": {
    "required": [
     "date"
    ],
    "type": "object",
    "properties": {
     "result": {
      "type": "string",
      "description": "Result",
      "nullable": true
     },
     "date": {
      "type": "string",
      "description": "Date",
      "format": "date-time"
     }
    }
   },
   "IbmbCourierInformation": {
    "required": [
     "supplementaryCardFlag"
    ],
    "type": "object",
    "properties": {
     "maskedCardNumber": {
      "type": "string",
      "description": "Masked Card Number",
      "nullable": true
     },
     "courierCompanyCode": {
      "type": "string",
      "description": "Courier Company Code",
      "nullable": true
     },
     "barcode": {
      "type": "string",
      "description": "Barcode",
      "nullable": true
     },
     "lastProcessStatusDate": {
      "type": "string",
      "description": "Last Process Status Date",
      "nullable": true
     },
     "courierStateDescription": {
      "type": "string",
      "description": "Courier State Description",
      "nullable": true
     },
     "productType": {
      "type": "string",
      "description": "Product Type",
      "nullable": true
     },
     "deliveryType": {
      "type": "string",
      "description": "Delivery Type",
      "nullable": true
     },
     "deliveryTypeDescription": {
      "type": "string",
      "description": "Delivery Type Description",
      "nullable": true
     },
     "sendingAdress": {
      "type": "string",
      "description": "Sending Adress",
      "nullable": true
     },
     "sendingBranchName": {
      "type": "string",
      "description": "Sending Branch Name",
      "nullable": true
     },
     "applicationDate": {
      "type": "string",
      "description": "Application Date",
      "nullable": true
     },
     "renewDate": {
      "type": "string",
      "description": "Renew Date",
      "nullable": true
     },
     "receiveNameSurname": {
      "type": "string",
      "description": "Receive Name Surname",
      "nullable": true
     },
     "embossName": {
      "type": "string",
      "description": "Emboss Name",
      "nullable": true
     },
     "returnReason": {
      "type": "string",
      "description": "Return Reason",
      "nullable": true
     },
     "cardStatusCode": {
      "type": "string",
      "description": "Card Status Code",
      "nullable": true
     },
     "cardStatusDescription": {
      "type": "string",
      "description": "Card Status Description",
      "nullable": true
     },
     "cardStatusReasonCode": {
      "type": "string",
      "description": "Card Status Reason Code",
      "nullable": true
     },
     "cardStatusReasonDescription": {
      "type": "string",
      "description": "Card Status Reason Description",
      "nullable": true
     },
     "embossCompanyOperationStatus": {
      "type": "string",
      "description": "Emboss Company Operation Status",
      "nullable": true
     },
     "embossReasonCode": {
      "type": "string",
      "description": "Emboss Reason Code",
      "nullable": true
     },
     "embossReasonDescription": {
      "type": "string",
      "description": "Emboss Reason Description",
      "nullable": true
     },
     "embossReasonSubCode": {
      "type": "string",
      "description": "Emboss Reason Sub Code",
      "nullable": true
     },
     "embossReasonSubDescription": {
      "type": "string",
      "description": "Emboss Reason Sub Description",
      "nullable": true
     },
     "cardEmbossDate": {
      "type": "string",
      "description": "Card Emboss Date",
      "nullable": true
     },
     "courierStateCode": {
      "type": "string",
      "description": "Courier State Code",
      "nullable": true
     },
     "cardType": {
      "type": "string",
      "description": "Card Type",
      "nullable": true
     },
     "productNumber": {
      "type": "string",
      "description": "Product Number",
      "nullable": true
     },
     "supplementaryCardFlag": {
      "type": "boolean",
      "description": "Supplementary Card Flag"
     }
    }
   },
   "LatestBarcodeStateInformation": {
    "required": [
     "numberOfDaysOnTheCourier"
    ],
    "type": "object",
    "properties": {
     "maskedCardNumber": {
      "type": "string",
      "description": "Masked Card Number",
      "nullable": true
     },
     "latestBarcodeNumber": {
      "type": "string",
      "description": "Latest Barcode Number",
      "nullable": true
     },
     "latestCourierState": {
      "type": "string",
      "description": "Latest Courier State",
      "nullable": true
     },
     "numberOfDaysOnTheCourier": {
      "type": "integer",
      "description": "Number Of Days On The Courier",
      "format": "int32"
     },
     "callOnNumber": {
      "type": "string",
      "description": "Call On Number",
      "nullable": true
     }
    }
   },
   "UpdateAddressInformationIntegrationRequest": {
    "type": "object",
    "properties": {
     "barcode": {
      "type": "string",
      "description": "Barcode",
      "nullable": true
     },
     "deliveryType": {
      "type": "string",
      "description": "Delivery Type",
      "nullable": true
     },
     "addressText": {
      "type": "string",
      "description": "Address Text",
      "nullable": true
     },
     "additionalInfo": {
      "type": "string",
      "description": "Additional Info",
      "nullable": true
     },
     "agentId": {
      "type": "string",
      "description": "Agent Id",
      "nullable": true
     }
    }
   },
   "UpdateAddressInformationIntegrationResponse": {
    "type": "object",
    "properties": {
     "responseCode": {
      "type": "string",
      "description": "Response Code",
      "nullable": true
     },
     "responseDescription": {
      "type": "string",
      "description": "Response Description",
      "nullable": true
     }
    }
   },
   "UpdateMovementsWithBarcodeNumberIntegrationRequest": {
    "type": "object",
    "properties": {
     "barcode": {
      "type": "string",
      "description": "Barcode",
      "nullable": true
     },
     "operationDateStr": {
      "type": "string",
      "description": "Operation Date Str",
      "nullable": true
     },
     "operationTimeStr": {
      "type": "string",
      "description": "Operation Time Str",
      "nullable": true
     },
     "operationStatus": {
      "type": "string",
      "description": "Operation Status",
      "nullable": true
     },
     "operationDescription": {
      "type": "string",
      "description": "Operation Description",
      "nullable": true
     },
     "receivedByWhomNameSurname": {
      "type": "string",
      "description": "Received By Whom Name Surname",
      "nullable": true
     }
    }
   },
   "UpdateMovementsWithBarcodeNumberIntegrationResponse": {
    "type": "object",
    "properties": {
     "responseCode": {
      "type": "string",
      "description": "Response Code",
      "nullable": true
     },
     "responseDescription": {
      "type": "string",
      "description": "Response Description",
      "nullable": true
     }
    }
   }
  },
  "responses": {
   "ActionNotFound": {
    "description": "Action Not Found"
   },
   "BusinessFailure": {
    "description": "Business Failure",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "TechnicalFailure": {
    "description": "Technical Failure"
   }
  }
 },
 "tags": [
  {
   "name": "Card delivery and courier tracking",
   "description": "Get a produced card to the cardholder — generate the distribution file, track the courier by barcode, and correct the delivery address while the card is in transit."
  },
  {
   "name": "Platform operations",
   "description": "Health checks and cache refresh. Called by your monitoring, not by a cardholder journey."
  }
 ],
 "x-tagGroups": [
  {
   "name": "Cards",
   "tags": [
    "Card delivery and courier tracking"
   ]
  },
  {
   "name": "Platform",
   "tags": [
    "Platform operations"
   ]
  }
 ]
}