---
agentTools:
  projectIndex: https://sprinque.readme.io/llms.txt
---

# Update credit note file.

Use this endpoint to update the credit note file.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Sprinque API",
    "version": "0.0.1",
    "description": "Sprinque API"
  },
  "paths": {
    "/api/v1/credit_note/{credit_note_id}/update_file/": {
      "post": {
        "operationId": "api_v1_credit_note_update_file_create",
        "description": "Use this endpoint to update the credit note file.",
        "summary": "Update credit note file.",
        "parameters": [
          {
            "in": "path",
            "name": "credit_note_id",
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-Za-z_\\-]+$"
            },
            "required": true
          },
          {
            "in": "header",
            "name": "X-API-KEY-ID",
            "schema": {
              "type": "string"
            },
            "description": "Sprinque authenticates using API keys. \n    API Key can be generated on the Sprinque \n    MCC portal from the “My Account” page. \n    The same key can be used for all API calls.",
            "required": true,
            "explode": true
          }
        ],
        "tags": [
          "Credit note"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditNoteRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreditNoteRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreditNoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            },
            "description": ""
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequests"
                }
              }
            },
            "description": ""
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            },
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BadRequestError": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TypeEnum"
              }
            ],
            "default": "api_error"
          },
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Bad Request"
          },
          "message": {
            "type": "string",
            "default": "Bad Request",
            "description": "The request was unacceptable, often due to missing a required parameter."
          },
          "param": {
            "type": "string",
            "default": "",
            "description": "Request params"
          }
        }
      },
      "CreditNoteRequest": {
        "type": "object",
        "properties": {
          "credit_note_url": {
            "type": "string"
          }
        },
        "required": [
          "credit_note_url"
        ]
      },
      "CreditNoteResponse": {
        "type": "object",
        "properties": {
          "_uuid": {
            "type": "string",
            "title": " uuid"
          },
          "credit_note_file": {
            "type": "string"
          },
          "trace_id": {
            "type": "string",
            "description": "Unique ID to identify each API call."
          }
        },
        "required": [
          "_uuid",
          "credit_note_file",
          "trace_id"
        ]
      },
      "InternalServerError": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TypeEnum"
              }
            ],
            "default": "api_error"
          },
          "code": {
            "type": "integer",
            "default": 500,
            "description": "Server Errors"
          },
          "message": {
            "type": "string",
            "default": "Server Errors",
            "description": "Something went wrong on Sprinque Gateway's end."
          },
          "param": {
            "type": "string",
            "default": "",
            "description": "Request params"
          }
        }
      },
      "TooManyRequests": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TypeEnum"
              }
            ],
            "default": "api_error"
          },
          "code": {
            "type": "integer",
            "default": 429,
            "description": "Too Many Requests"
          },
          "message": {
            "type": "string",
            "default": "Too many requests",
            "description": "Too many requests hit the API too quickly.            We recommend an exponential backoff of your requests."
          },
          "param": {
            "type": "string",
            "default": "",
            "description": "Request params"
          }
        }
      },
      "TypeEnum": {
        "enum": [
          "i",
          "n",
          "v",
          "a",
          "l",
          "d",
          "_",
          "r",
          "e",
          "q",
          "u",
          "s",
          "t",
          "o"
        ],
        "type": "string",
        "description": "* `i` - i\n* `n` - n\n* `v` - v\n* `a` - a\n* `l` - l\n* `d` - d\n* `_` - _\n* `r` - r\n* `e` - e\n* `q` - q\n* `u` - u\n* `s` - s\n* `t` - t\n* `o` - o"
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TypeEnum"
              }
            ],
            "default": "api_error"
          },
          "code": {
            "type": "integer",
            "default": 401,
            "description": "Unauthorized"
          },
          "message": {
            "type": "string",
            "default": "Unauthorized",
            "description": "No valid API key provided."
          },
          "param": {
            "type": "string",
            "default": "",
            "description": "Request params"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api-sandbox.sprinque.com/"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 97,
      "1": 196,
      "2": 193,
      "3": 177,
      "4": 38,
      "5": 35,
      "6": 143,
      "7": 0,
      "8": 119,
      "9": 202,
      "10": 120,
      "11": 78
    }
  }
}
```