I need to upload signature image inside Service Agreement object to the API endpoint. Here is the image of API documentat
Just for editing of existing Service Agreement I have following Retrofit interface:
@PUT("/v3/service_agreement_setups/{id}")
Single<Response<Agreement>> editAgreement(@Path("id") Integer id, @Body AgreementRequest agreementRequest);
AgreemnetRequest has the following structure:
public class AgreementRequest {
@Expose @SerializedName("service_agreement_setup") private Agreement agreement;
public AgreementRequest(Agreement agreement) {
this.agreement = agreement;
}
public Agreement getAgreement() {
return agreement;
}
public void setAgreement(Agreement agreement) {
this.agreement = agreement;
}
}
So, as you can see inside Agreement class I should have signature_image field and upload image file.
How I can do that?