Solvimon attachments API
The attachments API from Solvimon — 2 operation(s) for attachments.
The attachments API from Solvimon — 2 operation(s) for attachments.
openapi: 3.1.0
info:
title: Configuration alertRules attachments API
version: 1.0.0
servers:
- url: https://test.api.solvimon.com
description: The TEST environment for our API
- url: https://api.solvimon.com
description: The live environment for our API
tags:
- name: attachments
paths:
/v{version}/attachments:
get:
operationId: getAttachments
summary: Get attachments
description: Requires the ATTACHMENT.VIEW permission.
tags:
- attachments
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resource_type
in: query
description: Filter by resource type
required: true
schema:
type: string
- name: resource_id
in: query
description: Filter by resource ID
required: true
schema:
type: string
- name: expand[]
in: query
description: The id fields of the resources that are going to be expanded.
required: false
schema:
type: array
items:
type: string
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AttachmentResponseWrapper'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
post:
operationId: postAttachments
summary: Create an attachment
description: Requires the ATTACHMENT.CREATE permission.
tags:
- attachments
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AttachmentCreateRequest'
/v{version}/attachments/{resourceId}:
get:
operationId: getAttachmentsByResourceId
summary: Get an attachment by ID
description: Requires the ATTACHMENT.VIEW permission.
tags:
- attachments
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceId
in: path
description: The ID of the resource to be requested.
required: true
schema:
type: string
default: ''
- name: expand[]
in: query
description: The id fields of the resources that are going to be expanded.
required: false
schema:
type: array
items:
type: string
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
delete:
operationId: deleteAttachmentsByResourceId
summary: Delete an attachment
description: Requires the ATTACHMENT.DELETE permission.
tags:
- attachments
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceId
in: path
description: The ID of the resource to be requested.
required: true
schema:
type: string
default: ''
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
components:
schemas:
ApiErrorResourceType:
type: string
enum:
- CUSTOMER
- CUSTOM_FIELD
- PLATFORM
- PLATFORM_UPTODATE
- METER
- METER_VALUE
- METER_PROPERTY
- METER_VALUE_CALCULATION
- INGEST_DATA
- METER_DATA
- CHARGE_DATA
- PERSIST_DATA
- ADJUSTMENT_DATA
- PRODUCT_CATEGORY
- PRODUCT
- PRODUCT_ITEM
- PRICING
- PRICING_GROUP
- PRICING_ITEM
- PRICING_ITEM_CONFIG
- PRICING_PLAN_SUBSCRIPTION
- PRICING_PLAN_SUBSCRIPTION_GROUP
- PRICING_PLAN_SCHEDULE
- PRICING_PLAN
- PRICING_PLAN_VERSION
- QUOTE
- QUOTE_VERSION
- QUOTE_TEMPLATE
- API_KEY
- USER
- ROLE
- PROXY_USER
- EXTERNAL_CREDENTIALS
- TOKEN
- INVOICE
- E_INVOICE
- PDF
- BILLING_ENTITY
- FEATURE
- MEMBERSHIP
- PAYMENT
- PAYMENT_ACCEPTOR
- PAYMENT_METHOD
- PAYMENT_METHOD_OPTIONS
- PAYMENT_SCHEDULE
- PAYMENT_REQUEST
- INTEGRATION
- WEBHOOK
- FILE
- FILE_PROCESSING_SETTINGS
- TEAM
- DOWNLOAD_URL
- CSV_REPORT
- REPORT
- REPORT_GENERATE_REQUEST
- REPORT_CONFIGURATION
- REPORT_SUBSCRIPTION
- REPORT_DEFINITION
- ACCOUNT_GROUP
- ENTITY
- EVENT_TRACE
- EVENT_TRACE_LINK
- PRICING_CATEGORY
- CONTACT
- ALERT_RULE
- ALERT
- AUDIT_RECORD
- PORTAL_URL
- AUTHENTICATION_PROVIDER
- REPROCESS
- APPROVAL_POLICY
- APPROVAL_REQUEST
- BULK_ACTION
- COUPON
- PROMOTION_CODE
- WALLET
- WALLET_TYPE
- WALLET_GRANT
- WORKFLOW
- WORKFLOW_TRIGGER
- WORKFLOW_ACTION
- CREDIT_TYPE
- SIGNATURE_REQUEST
- ATTACHMENT
- DOCUMENT
title: ApiErrorResourceType
ResourceIdentifier:
type: object
properties:
type:
$ref: '#/components/schemas/ResourceIdentifierType'
id:
type: string
title: ResourceIdentifier
ResourceIdentifierType:
type: string
enum:
- PLATFORM
- CUSTOMER
- BILLING_ENTITY
- METER
- METER_VALUE
- METER_PROPERTY
- METER_VALUE_CALCULATION
- PRODUCT
- PRODUCT_ITEM
- PRODUCT_CATEGORY
- PRICING
- PRICING_ITEM
- PRICING_ITEM_CONFIG
- PRICING_ITEM_SUMMARY
- METER_VALUE_CALCULATION_SUMMARY
- PRICING_PLAN
- PRICING_PLAN_VERSION
- PRICING_PLAN_SUBSCRIPTION
- PRICING_PLAN_SCHEDULE
- QUOTE
- QUOTE_VERSION
- CONTACT
- CUSTOM_FIELD
- REQUEST_REFERENCE
- METER_DATA
- CHARGE_DATA
- ADJUSTMENT_DATA
- PERSIST_DATA
- INVOICE
- INVOICE_PAYMENT_ATTEMPT
- PAYMENT_ACCEPTOR
- PAYMENT_SCHEDULE
- PAYMENT_REQUEST
- FEATURE
- ALERT_RULE
- ALERT
- USER
- MEMBERSHIP
- TEAM
- ENTITY
- ACCOUNT_GROUP
- AUDIT
- WEBHOOK
- REPORT_SUBSCRIPTION
- REPORT_CONFIGURATION
title: ResourceIdentifierType
Document:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
created_at:
type:
- string
- 'null'
name:
type: string
description: The name of the document.
description:
type:
- string
- 'null'
description: An optional description of the document.
content_type:
type: string
description: Content type of the file (e.g. application/pdf).
content:
type: string
description: The file content, BASE64 encoded. Max 10MB.
file_size:
type:
- integer
- 'null'
format: int64
description: The file size in bytes.
downloaded_at:
type:
- string
- 'null'
description: Timestamp of the most recent download.
title: Document
Attachment:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
created_at:
type:
- string
- 'null'
document_id:
type: string
description: The document ID to attach.
document:
oneOf:
- $ref: '#/components/schemas/Document'
- type: 'null'
description: The expanded document object.
resource:
$ref: '#/components/schemas/ResourceIdentifier'
description: The resource to attach the document to.
title: Attachment
DocumentCreateRequest:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
created_at:
type:
- string
- 'null'
name:
type: string
description: The name of the document.
description:
type:
- string
- 'null'
description: An optional description of the document.
content_type:
type: string
description: Content type of the file (e.g. application/pdf).
content:
type: string
description: The file content, BASE64 encoded. Max 10MB.
file_size:
type:
- integer
- 'null'
format: int64
description: The file size in bytes.
downloaded_at:
type:
- string
- 'null'
description: Timestamp of the most recent download.
title: DocumentCreateRequest
ApiErrorCode:
type: string
enum:
- RESOURCE_NOT_FOUND
- RESOURCES_NOT_FOUND
- UNABLE_TO_PROCESS_INSTRUCTIONS
- BAD_REQUEST
- UNSUPPORTED_MEDIA_TYPE
- RESOURCE_ALREADY_EXISTS
- CUSTOM_FIELD_VALUE_ALREADY_EXISTS
- COULD_NOT_CREATE_RESOURCE
- COULD_NOT_UPDATE_RESOURCE
- COULD_NOT_DELETE_RESOURCE
- MISSING_VERSION
- UNSUPPORTED_VERSION
- UNAUTHORISED
- CUSTOMER_NOT_FOUND
- PLATFORM_NOT_FOUND
- PRICING_PLAN_NOT_FOUND
- PRODUCT_NOT_FOUND
- PRODUCT_ITEM_NOT_FOUND
- PRICING_NOT_FOUND
- PRICING_ITEM_NOT_FOUND
- USER_NOT_FOUND
- METER_NOT_FOUND
- METER_VALUE_NOT_FOUND
- METER_PROPERTY_NOT_FOUND
- PRICING_ITEM_SUMMARIES_NOT_FOUND
- MISSING_ID
- INVALID_ID
- MISSING_REFERENCE
- MISSING_FIELD
- INVALID_FIELD
- INVALID_OPERATION
- INTERNAL_ERROR
- USER_NOT_ALLOWED
- IDEMPOTENCY_CHECK_FAILED
- INVALID_REQUEST
title: ApiErrorCode
ApiErrorType:
type: string
enum:
- API_ERROR
- INVALID_REQUEST
title: ApiErrorType
AttachmentCreateRequest:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
created_at:
type:
- string
- 'null'
document_id:
type: string
description: The document ID to attach.
document:
oneOf:
- $ref: '#/components/schemas/DocumentCreateRequest'
- type: 'null'
description: The expanded document object.
resource:
$ref: '#/components/schemas/ResourceIdentifierCreateRequest'
description: The resource to attach the document to.
required:
- document_id
- resource
title: AttachmentCreateRequest
ResourceIdentifierCreateRequestType:
type: string
enum:
- PLATFORM
- CUSTOMER
- BILLING_ENTITY
- METER
- METER_VALUE
- METER_PROPERTY
- METER_VALUE_CALCULATION
- PRODUCT
- PRODUCT_ITEM
- PRODUCT_CATEGORY
- PRICING
- PRICING_ITEM
- PRICING_ITEM_CONFIG
- PRICING_ITEM_SUMMARY
- METER_VALUE_CALCULATION_SUMMARY
- PRICING_PLAN
- PRICING_PLAN_VERSION
- PRICING_PLAN_SUBSCRIPTION
- PRICING_PLAN_SCHEDULE
- QUOTE
- QUOTE_VERSION
- CONTACT
- CUSTOM_FIELD
- REQUEST_REFERENCE
- METER_DATA
- CHARGE_DATA
- ADJUSTMENT_DATA
- PERSIST_DATA
- INVOICE
- INVOICE_PAYMENT_ATTEMPT
- PAYMENT_ACCEPTOR
- PAYMENT_SCHEDULE
- PAYMENT_REQUEST
- FEATURE
- ALERT_RULE
- ALERT
- USER
- MEMBERSHIP
- TEAM
- ENTITY
- ACCOUNT_GROUP
- AUDIT
- WEBHOOK
- REPORT_SUBSCRIPTION
- REPORT_CONFIGURATION
title: ResourceIdentifierCreateRequestType
ApiError:
type: object
properties:
type:
$ref: '#/components/schemas/ApiErrorType'
code:
$ref: '#/components/schemas/ApiErrorCode'
field:
type:
- string
- 'null'
message:
type: string
resource_id:
type:
- string
- 'null'
resource_type:
oneOf:
- $ref: '#/components/schemas/ApiErrorResourceType'
- type: 'null'
required:
- type
- code
- message
title: ApiError
AttachmentResponseWrapper:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Attachment'
required:
- data
title: AttachmentResponseWrapper
ResourceIdentifierCreateRequest:
type: object
properties:
type:
$ref: '#/components/schemas/ResourceIdentifierCreateRequestType'
id:
type: string
title: ResourceIdentifierCreateRequest
securitySchemes:
API-Key:
type: apiKey
in: header
name: X-API-KEY
JWT-Authentication:
type: http
scheme: bearer